[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.
This commit is contained in:
committed by
Pierre-Marie de Rodat
parent
f40948963b
commit
a24614ec49
@@ -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;
|
||||
|
||||
--------------------------------
|
||||
|
||||
Reference in New Issue
Block a user