diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-04 07:45:20 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-04 07:45:20 +0000 |
commit | c04fff3eacf443fabf4408992ad0f1a7a40ae6de (patch) | |
tree | c99f88092f5c194ff8b0d6bd08570d448e0d0837 /gcc/ada/prj-proc.adb | |
parent | 489286f57a19e74a39775cb8f8fb98df70695a4c (diff) | |
download | ppe42-gcc-c04fff3eacf443fabf4408992ad0f1a7a40ae6de.tar.gz ppe42-gcc-c04fff3eacf443fabf4408992ad0f1a7a40ae6de.zip |
2011-08-04 Emmanuel Briot <briot@adacore.com>
* prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
Add support for overriding the Project_Path in aggregate projects.
2011-08-04 Robert Dewar <dewar@adacore.com>
* a-cofove.ads: Minor reformatting.
2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
on the generated code.
(Build_Finalize_Statements): Update the comment on the generated code.
(Build_Initialize_Statements): Update the comment on the generated code.
(Build_Object_Declarations): Add local variable Result. The object
declarations are now built in sequence.
* rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
RE_Unit_Table.
2011-08-04 Robert Dewar <dewar@adacore.com>
* checks.adb, alfa.adb, alfa.ads: Minor reformatting.
2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
* einfo.ads (Elaboration_Entity): Document new definition and use.
(Elaboration_Entity_Required): Adjust to above change.
* exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
* exp_ch12.adb: And with and use for Snames.
(Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
* exp_util.adb (Set_Elaboration_Flag): Likewise.
* sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
<Check_Unit_Name>: Deal with N_Expanded_Name.
<Attribute_Elaborated>: Extend to all unit names.
* sem_elab.adb: And with and use for Uintp.
(Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
* sem_util.ads (Build_Elaboration_Entity): Adjust comment.
* sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
* bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
from Gen_Adainit_Ada.
(Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
(Gen_Adafinal_Ada): Remove redundant test. In the non-main program
case, do not call System.Standard_Library.Adafinal; instead call
finalize_library if needed.
(Gen_Adafinal_C): Likewise.
(Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
non-main program case.
(Gen_Adainit_C): Generate a couple of external declarations here.
In the main program case, set SSL.Finalize_Library_Objects.
(Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
(Gen_Elab_Calls_C): Likewise.
(Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
(Gen_Finalize_Library_C): Likewise. Generate a full function.
(Gen_Main_C): Put back call to Ada_Final and don't finalize library
objects here.
(Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
Gen_Adafinal_Ada.
(Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
of external declarations. Call Gen_Finalize_Library_C.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177318 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-proc.adb')
-rw-r--r-- | gcc/ada/prj-proc.adb | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/gcc/ada/prj-proc.adb b/gcc/ada/prj-proc.adb index 366dfced32d..295ac40c06f 100644 --- a/gcc/ada/prj-proc.adb +++ b/gcc/ada/prj-proc.adb @@ -28,6 +28,7 @@ with Opt; use Opt; with Osint; use Osint; with Output; use Output; with Prj.Attr; use Prj.Attr; +with Prj.Env; with Prj.Err; use Prj.Err; with Prj.Ext; use Prj.Ext; with Prj.Nmsc; use Prj.Nmsc; @@ -1971,10 +1972,6 @@ package body Prj.Proc is & Get_Name_String (Index_Name) & ")", New_Value.Value); end if; end if; - - elsif Name = Snames.Name_Project_Path then - Debug_Output - ("Defined project path"); end if; end Process_Expression_For_Associative_Array; @@ -1987,11 +1984,10 @@ package body Prj.Proc is New_Value : Variable_Value) is Name : constant Name_Id := Name_Of (Current_Item, Node_Tree); - Var : Variable_Id := No_Variable; - Is_Attribute : constant Boolean := Kind_Of (Current_Item, Node_Tree) = N_Attribute_Declaration; + Var : Variable_Id := No_Variable; begin -- First, find the list where to find the variable or attribute. @@ -2056,6 +2052,29 @@ package body Prj.Proc is else Shared.Variable_Elements.Table (Var).Value := New_Value; end if; + + if Name = Snames.Name_Project_Path then + if In_Tree.Is_Root_Tree then + declare + Val : String_List_Id := New_Value.Values; + begin + while Val /= Nil_String loop + Prj.Env.Add_Directories + (Child_Env.Project_Path, + Get_Name_String + (Shared.String_Elements.Table (Val).Value)); + Val := Shared.String_Elements.Table (Val).Next; + end loop; + end; + + else + if Current_Verbosity = High then + Debug_Output + ("'for Project_Path' has no effect except in" + & " root aggregate"); + end if; + end if; + end if; end Process_Expression_Variable_Decl; ------------------------ |