diff options
Diffstat (limited to 'gcc/ada/aspects.adb')
-rwxr-xr-x | gcc/ada/aspects.adb | 89 |
1 files changed, 14 insertions, 75 deletions
diff --git a/gcc/ada/aspects.adb b/gcc/ada/aspects.adb index b92891c512b..ca87c6c2c1d 100755 --- a/gcc/ada/aspects.adb +++ b/gcc/ada/aspects.adb @@ -29,13 +29,12 @@ -- -- ------------------------------------------------------------------------------ -with Atree; use Atree; -with Nlists; use Nlists; -with Sinfo; use Sinfo; -with Snames; use Snames; -with Tree_IO; use Tree_IO; +with Atree; use Atree; +with Nlists; use Nlists; +with Sinfo; use Sinfo; +with Tree_IO; use Tree_IO; -with GNAT.HTable; use GNAT.HTable; +with GNAT.HTable; use GNAT.HTable; package body Aspects is @@ -63,66 +62,6 @@ package body Aspects is Hash => AS_Hash, Equal => "="); - ----------------------------------------- - -- Table Linking Names and Aspect_Id's -- - ----------------------------------------- - - type Aspect_Entry is record - Nam : Name_Id; - Asp : Aspect_Id; - end record; - - 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)); - ------------------------------------- -- Hash Table for Aspect Id Values -- ------------------------------------- @@ -147,15 +86,6 @@ package body Aspects is Hash => AI_Hash, Equal => "="); - ------------------- - -- Get_Aspect_Id -- - ------------------- - - function Get_Aspect_Id (Name : Name_Id) return Aspect_Id is - begin - return Aspect_Id_Hash_Table.Get (Name); - end Get_Aspect_Id; - --------------------------- -- Aspect_Specifications -- --------------------------- @@ -169,6 +99,15 @@ package body Aspects is end if; end Aspect_Specifications; + ------------------- + -- Get_Aspect_Id -- + ------------------- + + function Get_Aspect_Id (Name : Name_Id) return Aspect_Id is + begin + return Aspect_Id_Hash_Table.Get (Name); + end Get_Aspect_Id; + ------------------ -- Move_Aspects -- ------------------ |