-- then called to reflect the contributions of any unit on which this
-- unit is semantically dependent.
- -- Dependent_Unit
- -- This is a Boolean flag, which is set True to indicate that this
- -- entry is for a semantically dependent unit. This flag is nearly
- -- always set True, the only exception is for a unit that is loaded
- -- by an Rtsfind request in High_Integrity_Mode, where the entity that
- -- is obtained by Rtsfind.RTE is for an inlined subprogram or other
- -- entity for which a dependency need not be created.
-
-- The units table is reset to empty at the start of the compilation of
-- each main unit by Lib.Initialize. Entries are then added by calls to
-- the Lib.Load procedure. The following subprograms are used to access
function Cunit (U : Unit_Number_Type) return Node_Id;
function Cunit_Entity (U : Unit_Number_Type) return Entity_Id;
- function Dependent_Unit (U : Unit_Number_Type) return Boolean;
function Dependency_Num (U : Unit_Number_Type) return Nat;
function Dynamic_Elab (U : Unit_Number_Type) return Boolean;
function Error_Location (U : Unit_Number_Type) return Source_Ptr;
-- code unit, the criterion being that Get_Code_Unit yields the same
-- value for each argument.
+ function In_Same_Extended_Unit (N1, N2 : Node_Or_Entity_Id) return Boolean;
+ pragma Inline (In_Same_Extended_Unit);
+ -- Determines if two nodes or entities N1 and N2 are in the same
+ -- extended unit, where an extended unit is defined as a unit and all
+ -- its subunits (considered recursively, i.e. subunits of subunits are
+ -- included). Returns true if S1 and S2 are in the same extended unit
+ -- and False otherwise.
+
function In_Same_Extended_Unit (S1, S2 : Source_Ptr) return Boolean;
+ pragma Inline (In_Same_Extended_Unit);
-- Determines if the two source locations S1 and S2 are in the same
-- extended unit, where an extended unit is defined as a unit and all
- -- its subunits (considered recursively, i.e. subunits or subunits are
+ -- its subunits (considered recursively, i.e. subunits of subunits are
-- included). Returns true if S1 and S2 are in the same extended unit
-- and False otherwise.
-- Increment Serial_Number field for current unit, and return the
-- incremented value.
+ procedure Synchronize_Serial_Number;
+ -- This function increments the Serial_Number field for the current
+ -- unit but does not return the incremented value. This is used when
+ -- there is a situation where one path of control increments a serial
+ -- number (using Increment_Serial_Number), and the other path does not
+ -- and it is important to keep the serial numbers synchronized in the
+ -- two cases (e.g. when the references in a package and a client must
+ -- be kept consistent).
+
procedure Replace_Linker_Option_String
- (S : String_Id; Match_String : String);
+ (S : String_Id;
+ Match_String : String);
-- Replace an existing Linker_Option if the prefix Match_String
-- matches, otherwise call Store_Linker_Option_String.
-- Called to register a compilation switch, either front-end or
-- back-end, which may influence the generated output file(s).
+ procedure Disable_Switch_Storing;
+ -- Disable the registration of compilation switches with
+ -- Store_Compilation_Switch. This is used to not register switches added
+ -- automatically by the gcc driver.
+
procedure Store_Linker_Option_String (S : String_Id);
-- This procedure is called to register the string from a pragma
-- Linker_Option. The argument is the Id of the string to register.
procedure Lock;
-- Lock internal tables before calling back end
- procedure Tree_Write;
- -- Writes out internal tables to current tree file using Tree_Write
-
procedure Tree_Read;
- -- Initializes internal tables from current tree file using Tree_Read
+ -- Initializes internal tables from current tree file using the relevant
+ -- Table.Tree_Read routines.
+
+ procedure Tree_Write;
+ -- Writes out internal tables to current tree file using the relevant
+ -- Table.Tree_Write routines.
function Is_Loaded (Uname : Unit_Name_Type) return Boolean;
-- Determines if unit with given name is already loaded, i.e. there is
pragma Inline (Cunit);
pragma Inline (Cunit_Entity);
pragma Inline (Dependency_Num);
- pragma Inline (Dependent_Unit);
pragma Inline (Fatal_Error);
pragma Inline (Generate_Code);
pragma Inline (Has_RACW);
Cunit : Node_Id;
Cunit_Entity : Entity_Id;
Dependency_Num : Int;
- Dependent_Unit : Boolean;
Fatal_Error : Boolean;
Generate_Code : Boolean;
Has_RACW : Boolean;