aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/lib.ads
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2010-10-08 12:54:03 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2010-10-08 14:54:03 +0200
commit87003b285389a76fd9bb8a345a36ef2a9ebce0a1 (patch)
tree2a0cb37f03e0c50944d29b876561a756b303f1f9 /gcc/ada/lib.ads
parent0b89eea8926cb52d0b8c50b764a67572a9fde60d (diff)
downloadgcc-87003b285389a76fd9bb8a345a36ef2a9ebce0a1.zip
gcc-87003b285389a76fd9bb8a345a36ef2a9ebce0a1.tar.gz
gcc-87003b285389a76fd9bb8a345a36ef2a9ebce0a1.tar.bz2
ali.adb: Set Allocator_In_Body if AB parameter present on M line
2010-10-08 Robert Dewar <dewar@adacore.com> * ali.adb: Set Allocator_In_Body if AB parameter present on M line * ali.ads (Allocator_In_Body): New flag * bcheck.adb (Check_Consistent_Restrictions): Handle case of main program violating No_Allocators_After_Elaboration restriction. * gnatbind.adb (No_Restriction_List): Add entries for No_Anonymous_Allocators, and No_Allocators_After_Elaboration. * lib-load.adb: Initialize Has_Allocator flag * lib-writ.adb: Initialize Has_Allocator flag (M_Parameters): Set AB switch if Has_Allocator flag set * lib-writ.ads: Document AB flag on M line * lib.adb (Has_Allocator): New function (Set_Has_Allocator): New procedure * lib.ads (Has_Allocator): New function (Set_Has_Allocator): New procedure (Has_Allocator): New flag in Unit_Record * sem_ch4.adb (Analyze_Allocator): Add processing for No_Allocators_After_Elaboration. From-SVN: r165171
Diffstat (limited to 'gcc/ada/lib.ads')
-rw-r--r--gcc/ada/lib.ads12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ada/lib.ads b/gcc/ada/lib.ads
index 28e2ec0..1396252 100644
--- a/gcc/ada/lib.ads
+++ b/gcc/ada/lib.ads
@@ -357,6 +357,10 @@ package Lib is
-- that the default priority is to be used (and is also used for
-- entries that do not correspond to possible main programs).
+ -- Has_Allocator
+ -- This flag is set if a subprogram unit has an allocator after the
+ -- BEGIN (it is used to set the AB flag in the M ALI line).
+
-- OA_Setting
-- This is a character field containing L if Optimize_Alignment mode
-- was set locally, and O/T/S for Off/Time/Space default if not.
@@ -397,6 +401,7 @@ package Lib is
function Fatal_Error (U : Unit_Number_Type) return Boolean;
function Generate_Code (U : Unit_Number_Type) return Boolean;
function Ident_String (U : Unit_Number_Type) return Node_Id;
+ function Has_Allocator (U : Unit_Number_Type) return Boolean;
function Has_RACW (U : Unit_Number_Type) return Boolean;
function Is_Compiler_Unit (U : Unit_Number_Type) return Boolean;
function Loading (U : Unit_Number_Type) return Boolean;
@@ -415,6 +420,7 @@ package Lib is
procedure Set_Fatal_Error (U : Unit_Number_Type; B : Boolean := True);
procedure Set_Generate_Code (U : Unit_Number_Type; B : Boolean := True);
procedure Set_Has_RACW (U : Unit_Number_Type; B : Boolean := True);
+ procedure Set_Has_Allocator (U : Unit_Number_Type; B : Boolean := True);
procedure Set_Is_Compiler_Unit (U : Unit_Number_Type; B : Boolean := True);
procedure Set_Ident_String (U : Unit_Number_Type; N : Node_Id);
procedure Set_Loading (U : Unit_Number_Type; B : Boolean := True);
@@ -653,6 +659,7 @@ private
pragma Inline (Dependency_Num);
pragma Inline (Fatal_Error);
pragma Inline (Generate_Code);
+ pragma Inline (Has_Allocator);
pragma Inline (Has_RACW);
pragma Inline (Is_Compiler_Unit);
pragma Inline (Increment_Serial_Number);
@@ -664,6 +671,7 @@ private
pragma Inline (Set_Cunit_Entity);
pragma Inline (Set_Fatal_Error);
pragma Inline (Set_Generate_Code);
+ pragma Inline (Set_Has_Allocator);
pragma Inline (Set_Has_RACW);
pragma Inline (Set_Loading);
pragma Inline (Set_Main_Priority);
@@ -693,6 +701,7 @@ private
Is_Compiler_Unit : Boolean;
Dynamic_Elab : Boolean;
Loading : Boolean;
+ Has_Allocator : Boolean;
OA_Setting : Character;
end record;
@@ -720,7 +729,8 @@ private
Dynamic_Elab at 55 range 0 .. 7;
Is_Compiler_Unit at 56 range 0 .. 7;
OA_Setting at 57 range 0 .. 7;
- Loading at 58 range 0 .. 15;
+ Loading at 58 range 0 .. 7;
+ Has_Allocator at 59 range 0 .. 7;
end record;
for Unit_Record'Size use 60 * 8;