aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2022-01-11 20:41:13 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2022-07-12 12:24:13 +0000
commita24614ec4918d00f0c0761ba987cd15374b3ac43 (patch)
tree802115bdc3a88513862d80c6bbb7c8f772ad8dc2 /gcc/ada
parentf40948963b0847f995056fef25c41caec5a969e7 (diff)
downloadgcc-a24614ec4918d00f0c0761ba987cd15374b3ac43.zip
gcc-a24614ec4918d00f0c0761ba987cd15374b3ac43.tar.gz
gcc-a24614ec4918d00f0c0761ba987cd15374b3ac43.tar.bz2
[Ada] Simplify rewriting of attributes into Boolean literals
Code cleanup; semantics is unaffected. gcc/ada/ * sem_attr.adb (Set_Boolean_Result): Simplify using Boolean_Literals.
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/sem_attr.adb7
1 files changed, 1 insertions, 6 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index cab2461..adeda43 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -12778,13 +12778,8 @@ package body Sem_Attr is
------------------------
procedure Set_Boolean_Result (N : Node_Id; B : Boolean) is
- Loc : constant Source_Ptr := Sloc (N);
begin
- if B then
- Rewrite (N, New_Occurrence_Of (Standard_True, Loc));
- else
- Rewrite (N, New_Occurrence_Of (Standard_False, Loc));
- end if;
+ Rewrite (N, New_Occurrence_Of (Boolean_Literals (B), Sloc (N)));
end Set_Boolean_Result;
--------------------------------