-- Suppress_Elaboration_Warnings Flag303
-- Is_Elaboration_Warnings_OK_Id Flag304
-- Is_Activation_Record Flag305
+ -- Needs_Activation_Record Flag306
- -- (unused) Flag306
-- (unused) Flag307
-- (unused) Flag308
-- (unused) Flag309
return Flag208 (Id);
end Must_Have_Preelab_Init;
+ function Needs_Activation_Record (Id : E) return B is
+ begin
+ return Flag306 (Id);
+ end Needs_Activation_Record;
+
function Needs_Debug_Info (Id : E) return B is
begin
return Flag147 (Id);
Set_Flag208 (Id, V);
end Set_Must_Have_Preelab_Init;
+ procedure Set_Needs_Activation_Record (Id : E; V : B := True) is
+ begin
+ Set_Flag306 (Id, V);
+ end Set_Needs_Activation_Record;
+
procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
begin
Set_Flag147 (Id, V);
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_Activation_Record", Flag306 (Id));
W ("Needs_Debug_Info", Flag147 (Id));
W ("Needs_No_Actuals", Flag22 (Id));
W ("Never_Set_In_Source", Flag115 (Id));
-- preelaborable initialization at freeze time (this has to be deferred
-- to the freeze point because of the rule about overriding Initialize).
+-- Needs_Activation_Record (Flag306)
+-- Defined on access_to_subprogram types. Indicates that a call through
+-- a named or anonymous access to subprogram requires an activation
+-- record when compiling with unnesting for C or LLVM.
+
-- Needs_Debug_Info (Flag147)
-- Defined in all entities. Set if the entity requires normal debugging
-- information to be generated. This is true of all entities that have
-- Needs_No_Actuals (Flag22)
-- Original_Access_Type (Node28)
-- Can_Use_Internal_Rep (Flag229)
+ -- Needs_Activation_Record (Flag306)
-- (plus type attributes)
-- E_Access_Type
-- Directly_Designated_Type (Node20)
-- Storage_Size_Variable (Node26) ??? is this needed ???
-- Can_Use_Internal_Rep (Flag229)
+ -- Needs_Activation_Record (Flag306)
-- (plus type attributes)
-- E_Anonymous_Access_Type
function Modulus (Id : E) return U;
function Must_Be_On_Byte_Boundary (Id : E) return B;
function Must_Have_Preelab_Init (Id : E) return B;
+ function Needs_Activation_Record (Id : E) return B;
function Needs_Debug_Info (Id : E) return B;
function Needs_No_Actuals (Id : E) return B;
function Never_Set_In_Source (Id : E) return B;
procedure Set_Modulus (Id : E; V : U);
procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True);
procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True);
+ procedure Set_Needs_Activation_Record (Id : E; V : B := True);
procedure Set_Needs_Debug_Info (Id : E; V : B := True);
procedure Set_Needs_No_Actuals (Id : E; V : B := True);
procedure Set_Never_Set_In_Source (Id : E; V : B := True);
pragma Inline (Modulus);
pragma Inline (Must_Be_On_Byte_Boundary);
pragma Inline (Must_Have_Preelab_Init);
+ pragma Inline (Needs_Activation_Record);
pragma Inline (Needs_Debug_Info);
pragma Inline (Needs_No_Actuals);
pragma Inline (Never_Set_In_Source);
pragma Inline (Set_Modulus);
pragma Inline (Set_Must_Be_On_Byte_Boundary);
pragma Inline (Set_Must_Have_Preelab_Init);
+ pragma Inline (Set_Needs_Activation_Record);
pragma Inline (Set_Needs_Debug_Info);
pragma Inline (Set_Needs_No_Actuals);
pragma Inline (Set_Never_Set_In_Source);
Init_Size_Align (T_Name);
Set_Directly_Designated_Type (T_Name, Desig_Type);
+ -- If the access_to_subprogram is not declared at the library level,
+ -- it can only point to subprograms that are at the same or deeper
+ -- accessibility level. All such might require an activation record
+ -- when compiling for C.
+
+ Set_Needs_Activation_Record (T_Name,
+ not Is_Library_Level_Entity (T_Name));
+ Set_Needs_Activation_Record (Desig_Type,
+ not Is_Library_Level_Entity (T_Name));
+
Generate_Reference_To_Formals (T_Name);
-- Ada 2005 (AI-231): Propagate the null-excluding attribute