diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-08 06:58:02 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-08 06:58:02 +0000 |
commit | c386fa2de08cd32468387a3436513894094e488c (patch) | |
tree | da9dd7463bdc192a2130117d61ff57fc5d02ccc7 /gcc/ada/prj-pp.adb | |
parent | 29b44e776526ac8c223a53128e31821ea4ffe85a (diff) | |
download | gcc-c386fa2de08cd32468387a3436513894094e488c.tar.gz |
2008-04-08 Emmanuel Briot <briot@adacore.com>
* g-comlin.ads, g-comlin.adb (Expansion): Remove unreachable return
statement.
(Get_Configuration): New subprogram.
* prj-pp.ads, prj-pp.adb (Pretty_Print): new parameters Id and Id_Tree
These optional parameters help preserve the casing of the project's name
when pretty-printing.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134065 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-pp.adb')
-rw-r--r-- | gcc/ada/prj-pp.adb | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/gcc/ada/prj-pp.adb b/gcc/ada/prj-pp.adb index c8dc931a982..db2a655748f 100644 --- a/gcc/ada/prj-pp.adb +++ b/gcc/ada/prj-pp.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2007, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2008, Free Software Foundation, Inc. -- -- -- -- 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- -- @@ -73,7 +73,9 @@ package body Prj.PP is W_Char : Write_Char_Ap := null; W_Eol : Write_Eol_Ap := null; W_Str : Write_Str_Ap := null; - Backward_Compatibility : Boolean) + Backward_Compatibility : Boolean; + Id : Prj.Project_Id := Prj.No_Project; + Id_Tree : Prj.Project_Tree_Ref := null) is procedure Print (Node : Project_Node_Id; Indent : Natural); -- A recursive procedure that traverses a project file tree and outputs @@ -335,7 +337,12 @@ package body Prj.PP is Print (First_Comment_Before (Node, In_Tree), Indent); Start_Line (Indent); Write_String ("project "); - Output_Name (Name_Of (Node, In_Tree)); + + if Id /= Prj.No_Project then + Output_Name (Id_Tree.Projects.Table (Id).Display_Name); + else + Output_Name (Name_Of (Node, In_Tree)); + end if; -- Check if this project extends another project @@ -363,7 +370,13 @@ package body Prj.PP is Indent + Increment); Start_Line (Indent); Write_String ("end "); - Output_Name (Name_Of (Node, In_Tree)); + + if Id /= Prj.No_Project then + Output_Name (Id_Tree.Projects.Table (Id).Display_Name); + else + Output_Name (Name_Of (Node, In_Tree)); + end if; + Write_Line (";"); Print (First_Comment_After_End (Node, In_Tree), Indent); |