diff options
Diffstat (limited to 'gcc/ada/einfo.adb')
-rw-r--r-- | gcc/ada/einfo.adb | 65 |
1 files changed, 32 insertions, 33 deletions
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb index 0ed05608afb..1da975d0a9e 100644 --- a/gcc/ada/einfo.adb +++ b/gcc/ada/einfo.adb @@ -548,8 +548,9 @@ package body Einfo is -- Has_Static_Predicate_Aspect Flag259 -- Has_Loop_Entry_Attributes Flag260 - -- (unused) Flag261 - -- (unused) Flag262 + -- Has_Delayed_Rep_Aspects Flag261 + -- May_Inherit_Delayed_Rep_Aspects Flag262 + -- (unused) Flag263 -- (unused) Flag264 -- (unused) Flag265 @@ -589,10 +590,6 @@ package body Einfo is -- Determine whether abstract state State has a particular property denoted -- by the name Prop_Nam. - function Rep_Clause (Id : E; Rep_Name : Name_Id) return N; - -- Returns the attribute definition clause for Id whose name is Rep_Name. - -- Returns Empty if no matching attribute definition clause found for Id. - --------------- -- Float_Rep -- --------------- @@ -638,28 +635,6 @@ package body Einfo is return False; end Has_Property; - ---------------- - -- Rep_Clause -- - ---------------- - - function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is - Ritem : Node_Id; - - begin - Ritem := First_Rep_Item (Id); - while Present (Ritem) loop - if Nkind (Ritem) = N_Attribute_Definition_Clause - and then Chars (Ritem) = Rep_Name - then - return Ritem; - else - Next_Rep_Item (Ritem); - end if; - end loop; - - return Empty; - end Rep_Clause; - -------------------------------- -- Attribute Access Functions -- -------------------------------- @@ -1380,6 +1355,12 @@ package body Einfo is return Flag18 (Id); end Has_Delayed_Freeze; + function Has_Delayed_Rep_Aspects (Id : E) return B is + begin + pragma Assert (Nkind (Id) in N_Entity); + return Flag261 (Id); + end Has_Delayed_Rep_Aspects; + function Has_Discriminants (Id : E) return B is begin pragma Assert (Nkind (Id) in N_Entity); @@ -2421,6 +2402,11 @@ package body Einfo is return Flag168 (Id); end Materialize_Entity; + function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is + begin + return Flag262 (Id); + end May_Inherit_Delayed_Rep_Aspects; + function Mechanism (Id : E) return M is begin pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id)); @@ -3978,6 +3964,12 @@ package body Einfo is Set_Flag18 (Id, V); end Set_Has_Delayed_Freeze; + procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is + begin + pragma Assert (Nkind (Id) in N_Entity); + Set_Flag261 (Id, V); + end Set_Has_Delayed_Rep_Aspects; + procedure Set_Has_Discriminants (Id : E; V : B := True) is begin pragma Assert (Nkind (Id) in N_Entity); @@ -5063,6 +5055,11 @@ package body Einfo is Set_Flag168 (Id, V); end Set_Materialize_Entity; + procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is + begin + Set_Flag262 (Id, V); + end Set_May_Inherit_Delayed_Rep_Aspects; + procedure Set_Mechanism (Id : E; V : M) is begin pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id)); @@ -5969,7 +5966,7 @@ package body Einfo is function Address_Clause (Id : E) return N is begin - return Rep_Clause (Id, Name_Address); + return Get_Attribute_Definition_Clause (Id, Attribute_Address); end Address_Clause; --------------- @@ -5994,7 +5991,7 @@ package body Einfo is function Alignment_Clause (Id : E) return N is begin - return Rep_Clause (Id, Name_Alignment); + return Get_Attribute_Definition_Clause (Id, Attribute_Alignment); end Alignment_Clause; ------------------- @@ -6287,7 +6284,7 @@ package body Einfo is Id = Pragma_Contract_Cases or else Id = Pragma_Test_Case; Is_PPC : constant Boolean := Id = Pragma_Precondition or else Id = Pragma_Postcondition; - Delayed : constant Boolean := Is_CDG or else Is_CTC or else Is_PPC; + Delayed : constant Boolean := Is_CDG or Is_CTC or Is_PPC; Item : Node_Id; Items : Node_Id; @@ -7627,7 +7624,7 @@ package body Einfo is function Size_Clause (Id : E) return N is begin - return Rep_Clause (Id, Name_Size); + return Get_Attribute_Definition_Clause (Id, Attribute_Size); end Size_Clause; ------------------------ @@ -7636,7 +7633,7 @@ package body Einfo is function Stream_Size_Clause (Id : E) return N is begin - return Rep_Clause (Id, Name_Stream_Size); + return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size); end Stream_Size_Clause; ------------------ @@ -7895,6 +7892,7 @@ package body Einfo is W ("Has_Default_Aspect", Flag39 (Id)); W ("Has_Delayed_Aspects", Flag200 (Id)); W ("Has_Delayed_Freeze", Flag18 (Id)); + W ("Has_Delayed_Rep_Aspects", Flag261 (Id)); W ("Has_Discriminants", Flag5 (Id)); W ("Has_Dispatch_Table", Flag220 (Id)); W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id)); @@ -8070,6 +8068,7 @@ package body Einfo is W ("Low_Bound_Tested", Flag205 (Id)); W ("Machine_Radix_10", Flag84 (Id)); W ("Materialize_Entity", Flag168 (Id)); + W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id)); W ("Must_Be_On_Byte_Boundary", Flag183 (Id)); W ("Must_Have_Preelab_Init", Flag208 (Id)); W ("Needs_Debug_Info", Flag147 (Id)); |