diff options
Diffstat (limited to 'gcc/ada/aspects.ads')
-rwxr-xr-x | gcc/ada/aspects.ads | 67 |
1 files changed, 65 insertions, 2 deletions
diff --git a/gcc/ada/aspects.ads b/gcc/ada/aspects.ads index dc117e1aa20..ed391f03a07 100755 --- a/gcc/ada/aspects.ads +++ b/gcc/ada/aspects.ads @@ -34,8 +34,9 @@ -- aspect specifications from the tree. The semantic processing for aspect -- specifications is found in Sem_Ch13.Analyze_Aspect_Specifications. -with Namet; use Namet; -with Types; use Types; +with Namet; use Namet; +with Snames; use Snames; +with Types; use Types; package Aspects is @@ -159,6 +160,68 @@ package Aspects is Aspect_Write => Name, Boolean_Aspects => Optional); + ----------------------------------------- + -- Table Linking Names and Aspect_Id's -- + ----------------------------------------- + + type Aspect_Entry is record + Nam : Name_Id; + Asp : Aspect_Id; + end record; + + -- Table linking aspect names and id's + + Aspect_Names : constant array (Integer range <>) of Aspect_Entry := + ((Name_Ada_2005, Aspect_Ada_2005), + (Name_Ada_2012, Aspect_Ada_2012), + (Name_Address, Aspect_Address), + (Name_Alignment, Aspect_Alignment), + (Name_Atomic, Aspect_Atomic), + (Name_Atomic_Components, Aspect_Atomic_Components), + (Name_Bit_Order, Aspect_Bit_Order), + (Name_Component_Size, Aspect_Component_Size), + (Name_Dynamic_Predicate, Aspect_Dynamic_Predicate), + (Name_Discard_Names, Aspect_Discard_Names), + (Name_External_Tag, Aspect_External_Tag), + (Name_Favor_Top_Level, Aspect_Favor_Top_Level), + (Name_Inline, Aspect_Inline), + (Name_Inline_Always, Aspect_Inline_Always), + (Name_Input, Aspect_Input), + (Name_Invariant, Aspect_Invariant), + (Name_Machine_Radix, Aspect_Machine_Radix), + (Name_Object_Size, Aspect_Object_Size), + (Name_Output, Aspect_Output), + (Name_Pack, Aspect_Pack), + (Name_Persistent_BSS, Aspect_Persistent_BSS), + (Name_Post, Aspect_Post), + (Name_Postcondition, Aspect_Postcondition), + (Name_Pre, Aspect_Pre), + (Name_Precondition, Aspect_Precondition), + (Name_Predicate, Aspect_Predicate), + (Name_Preelaborable_Initialization, Aspect_Preelaborable_Initialization), + (Name_Pure_Function, Aspect_Pure_Function), + (Name_Read, Aspect_Read), + (Name_Shared, Aspect_Shared), + (Name_Size, Aspect_Size), + (Name_Static_Predicate, Aspect_Static_Predicate), + (Name_Storage_Pool, Aspect_Storage_Pool), + (Name_Storage_Size, Aspect_Storage_Size), + (Name_Stream_Size, Aspect_Stream_Size), + (Name_Suppress, Aspect_Suppress), + (Name_Suppress_Debug_Info, Aspect_Suppress_Debug_Info), + (Name_Type_Invariant, Aspect_Type_Invariant), + (Name_Unchecked_Union, Aspect_Unchecked_Union), + (Name_Universal_Aliasing, Aspect_Universal_Aliasing), + (Name_Unmodified, Aspect_Unmodified), + (Name_Unreferenced, Aspect_Unreferenced), + (Name_Unreferenced_Objects, Aspect_Unreferenced_Objects), + (Name_Unsuppress, Aspect_Unsuppress), + (Name_Value_Size, Aspect_Value_Size), + (Name_Volatile, Aspect_Volatile), + (Name_Volatile_Components, Aspect_Volatile_Components), + (Name_Warnings, Aspect_Warnings), + (Name_Write, Aspect_Write)); + function Get_Aspect_Id (Name : Name_Id) return Aspect_Id; pragma Inline (Get_Aspect_Id); -- Given a name Nam, returns the corresponding aspect id value. If the name |