From ab29a348ebe1345e469cede91ea4b2ef7c72e1fe Mon Sep 17 00:00:00 2001 From: Emmanuel Briot Date: Wed, 3 Aug 2011 10:01:51 +0000 Subject: [multiple changes] 2011-08-03 Yannick Moy * alfa.ads Update format of ALFA section in ALI file in order to add a mapping from bodies to specs when both are present (ALFA_Scope_Record): add components for spec file/scope * get_alfa.adb (Get_ALFA): read the new file/scope for spec when present * lib-xref-alfa.adb (Collect_ALFA): after all scopes have been collected, fill in the spec information when relevant * put_alfa.adb (Put_ALFA): write the new file/scope for spec when present. 2011-08-03 Eric Botcazou * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing code unit to decide whether to add internally generated subprograms. 2011-08-03 Javier Miranda * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram. * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must be handled by copy in VM targets. 2011-08-03 Emmanuel Briot * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): now shares code with Makeutl.Get_Switches. * prj-tree.adb: Update comment. From-SVN: r177257 --- gcc/ada/prj-ext.ads | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'gcc/ada/prj-ext.ads') diff --git a/gcc/ada/prj-ext.ads b/gcc/ada/prj-ext.ads index 4ea4608..75b0ed2 100644 --- a/gcc/ada/prj-ext.ads +++ b/gcc/ada/prj-ext.ads @@ -54,11 +54,25 @@ package Prj.Ext is procedure Free (Self : in out External_References); -- Free memory used by Self + type External_Source is + (From_Command_Line, + From_Environment, + From_External_Attribute); + -- Where was the value of an external reference defined ? + -- They are prioritized in that order, so that a user can always use the + -- command line to override a value coming from his environment, or an + -- environment variable to override a value defined in an aggregate project + -- through the "for External()..." attribute. + procedure Add (Self : External_References; External_Name : String; - Value : String); - -- Add an external reference (or modify an existing one) + Value : String; + Source : External_Source := External_Source'First); + -- Add an external reference (or modify an existing one). + -- No overriding is done if the Source's priority is less than the one + -- used to previously set the value of the variable. The default for Source + -- is such that overriding always occurs. function Value_Of (Self : External_References; @@ -88,9 +102,10 @@ private type Name_To_Name; type Name_To_Name_Ptr is access all Name_To_Name; type Name_To_Name is record - Key : Name_Id; - Value : Name_Id; - Next : Name_To_Name_Ptr; + Key : Name_Id; + Value : Name_Id; + Source : External_Source; + Next : Name_To_Name_Ptr; end record; procedure Set_Next (E : Name_To_Name_Ptr; Next : Name_To_Name_Ptr); -- cgit v1.1