diff options
author | Pascal Obry <obry@adacore.com> | 2012-02-08 09:31:12 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-02-08 10:31:12 +0100 |
commit | 75685ef74d410e993ed35c43ac76a56f00b4ddaf (patch) | |
tree | 60c3c2395d7e64a87e526596d8d75bab4c8b2e02 | |
parent | 8364925760fe4705c121c975fca117d26ac81aea (diff) | |
download | gcc-75685ef74d410e993ed35c43ac76a56f00b4ddaf.zip gcc-75685ef74d410e993ed35c43ac76a56f00b4ddaf.tar.gz gcc-75685ef74d410e993ed35c43ac76a56f00b4ddaf.tar.bz2 |
prj.adb (Compute_All_Imported_Projects): Use new For_Project_And_Aggregated_Context to ensure proper context is used for...
2012-02-08 Pascal Obry <obry@adacore.com>
* prj.adb (Compute_All_Imported_Projects): Use new
For_Project_And_Aggregated_Context to ensure proper context is
used for encapsulated aggregate libraries.
* prj-proc.adb (Recursive_Process): Call
Process_Aggregated_Projects earlier to ensure that all dependent
projects are set with the proper encapsulated status.
2012-02-08 Pascal Obry <obry@adacore.com>
* s-os_lib.adb (Normalize_Arguments): Properly escape last \ in null
terminated string.
From-SVN: r183999
-rw-r--r-- | gcc/ada/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/ada/prj-proc.adb | 5 | ||||
-rw-r--r-- | gcc/ada/prj.adb | 12 | ||||
-rwxr-xr-x | gcc/ada/s-os_lib.adb | 22 |
4 files changed, 42 insertions, 11 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 76ff4fb..4d0daf4 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,19 @@ 2012-02-08 Pascal Obry <obry@adacore.com> + * prj.adb (Compute_All_Imported_Projects): Use new + For_Project_And_Aggregated_Context to ensure proper context is + used for encapsulated aggregate libraries. + * prj-proc.adb (Recursive_Process): Call + Process_Aggregated_Projects earlier to ensure that all dependent + projects are set with the proper encapsulated status. + +2012-02-08 Pascal Obry <obry@adacore.com> + + * s-os_lib.adb (Normalize_Arguments): Properly escape last \ in null + terminated string. + +2012-02-08 Pascal Obry <obry@adacore.com> + * prj.ads, prj.adb (For_Project_And_Aggregated_Context): New generic routine with a context parameter. diff --git a/gcc/ada/prj-proc.adb b/gcc/ada/prj-proc.adb index e22c6ab..1d5c773 100644 --- a/gcc/ada/prj-proc.adb +++ b/gcc/ada/prj-proc.adb @@ -2908,6 +2908,10 @@ package body Prj.Proc is Process_Imported_Projects (Imported, Limited_With => True); + if Err_Vars.Total_Errors_Detected = 0 then + Process_Aggregated_Projects; + end if; + -- At this point (after Process_Declarative_Items) we have the -- attribute values set, we can backtrace In_Tree.Project and -- set the From_Encapsulated_Library status. @@ -2935,7 +2939,6 @@ package body Prj.Proc is end if; if Err_Vars.Total_Errors_Detected = 0 then - Process_Aggregated_Projects; -- For an aggregate library we add the aggregated projects -- as imported ones. This is necessary to give visibility diff --git a/gcc/ada/prj.adb b/gcc/ada/prj.adb index 15cb808..f9cc739 100644 --- a/gcc/ada/prj.adb +++ b/gcc/ada/prj.adb @@ -1476,7 +1476,8 @@ package body Prj is is procedure Analyze_Tree (Local_Root : Project_Id; - Local_Tree : Project_Tree_Ref); + Local_Tree : Project_Tree_Ref; + Context : Project_Context); -- Process Project and all its aggregated project to analyze their own -- imported projects. @@ -1486,7 +1487,8 @@ package body Prj is procedure Analyze_Tree (Local_Root : Project_Id; - Local_Tree : Project_Tree_Ref) + Local_Tree : Project_Tree_Ref; + Context : Project_Context) is pragma Unreferenced (Local_Root); @@ -1540,7 +1542,9 @@ package body Prj is Project.All_Imported_Projects := new Project_List_Element' (Project => Prj2, - From_Encapsulated_Lib => Context.From_Encapsulated_Lib, + From_Encapsulated_Lib => + Context.From_Encapsulated_Lib + or else Analyze_Tree.Context.From_Encapsulated_Lib, Next => Project.All_Imported_Projects); end if; end Recursive_Add; @@ -1564,7 +1568,7 @@ package body Prj is end Analyze_Tree; procedure For_Aggregates is - new For_Project_And_Aggregated (Analyze_Tree); + new For_Project_And_Aggregated_Context (Analyze_Tree); -- Start of processing for Compute_All_Imported_Projects diff --git a/gcc/ada/s-os_lib.adb b/gcc/ada/s-os_lib.adb index 9a07bbb..993cc8c 100755 --- a/gcc/ada/s-os_lib.adb +++ b/gcc/ada/s-os_lib.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2010, AdaCore -- +-- Copyright (C) 1995-2012, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,12 +31,12 @@ pragma Compiler_Unit; -with System.Case_Util; -with System.CRTL; -with System.Soft_Links; with Ada.Unchecked_Conversion; with Ada.Unchecked_Deallocation; with System; use System; +with System.Case_Util; +with System.CRTL; +with System.Soft_Links; package body System.OS_Lib is @@ -1703,6 +1703,16 @@ package body System.OS_Lib is -- If null terminated string, put the quote before if Res (J) = ASCII.NUL then + + -- If the string ends with \, double it + + if Res (J - 1) = '\' then + Res (J) := '\'; + J := J + 1; + end if; + + -- Then adds the quote and the NUL character + Res (J) := '"'; J := J + 1; Res (J) := ASCII.NUL; @@ -2131,8 +2141,8 @@ package body System.OS_Lib is Start := Last; loop Start := Start - 1; - exit when Start < 1 or else - Path_Buffer (Start) = Directory_Separator; + exit when Start < 1 + or else Path_Buffer (Start) = Directory_Separator; end loop; if Start <= 1 then |