diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-08 18:03:10 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-08 18:03:10 +0000 |
commit | 75209ec580b15561fd2cfdaac8d170ddac358633 (patch) | |
tree | eba6429960aa993a1e3a9b1deefd4dc536eb9375 /gcc/ada/prj-proc.adb | |
parent | fee96e903d674e86f46f067a8c3c584fca56e204 (diff) | |
download | gcc-75209ec580b15561fd2cfdaac8d170ddac358633.tar.gz |
2009-04-08 Robert Dewar <dewar@adacore.com>
* checks.adb (Enable_Overflow_Check): Do not enable if overflow checks
suppressed.
* exp_ch4.adb (Expand_Concatenate): Make sure checks are off for all
resolution steps.
2009-04-08 Robert Dewar <dewar@adacore.com>
* sem_ch12.adb (Analyze_Package_Instantiation): Remove test for
No_Local_Allocators restriction preventing local instantiation.
2009-04-08 Thomas Quinot <quinot@adacore.com>
* sem_eval.adb: Minor comment fix
2009-04-08 Thomas Quinot <quinot@adacore.com>
* g-socket.adb, g-socket.ads (GNAT.Sockets.Sockets_Library_Controller):
New limited controlled type used to automate the initialization and
finalization of the sockets implementation.
(GNAT.Sockets.Initialize, Finalize): Make these no-ops
2009-04-08 Vincent Celier <celier@adacore.com>
* prj-attr.adb: New read-only project-level attribute Project_Dir
* prj-proc.adb (Add_Attributes): New parameter Project_Dir, value of
read-only attribute of the same name.
(Process_Declarative_Items): Call Add_Attributes with Project_Dir
(Recursive_Process): Ditto
* snames.adb: Add new standard name Project_Dir
* snames.ads: Add new standard name Project_Dir
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145766 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-proc.adb')
-rw-r--r-- | gcc/ada/prj-proc.adb | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/gcc/ada/prj-proc.adb b/gcc/ada/prj-proc.adb index 03e7327b82e..5cd2fa222c4 100644 --- a/gcc/ada/prj-proc.adb +++ b/gcc/ada/prj-proc.adb @@ -66,6 +66,7 @@ package body Prj.Proc is procedure Add_Attributes (Project : Project_Id; Project_Name : Name_Id; + Project_Dir : Name_Id; In_Tree : Project_Tree_Ref; Decl : in out Declarations; First : Attribute_Node_Id; @@ -183,6 +184,7 @@ package body Prj.Proc is procedure Add_Attributes (Project : Project_Id; Project_Name : Name_Id; + Project_Dir : Name_Id; In_Tree : Project_Tree_Ref; Decl : in out Declarations; First : Attribute_Node_Id; @@ -217,13 +219,20 @@ package body Prj.Proc is Value => Empty_String, Index => 0); - -- Special case of <project>'Name + -- Special cases of <project>'Name and + -- <project>'Project_Dir. - if Project_Level - and then Attribute_Name_Of (The_Attribute) = - Snames.Name_Name - then - New_Attribute.Value := Project_Name; + if Project_Level then + if Attribute_Name_Of (The_Attribute) = + Snames.Name_Name + then + New_Attribute.Value := Project_Name; + + elsif Attribute_Name_Of (The_Attribute) = + Snames.Name_Project_Dir + then + New_Attribute.Value := Project_Dir; + end if; end if; -- List attributes have a default value of nil list @@ -1372,6 +1381,8 @@ package body Prj.Proc is Add_Attributes (Project, In_Tree.Projects.Table (Project).Name, + Name_Id + (In_Tree.Projects.Table (Project).Directory.Name), In_Tree, In_Tree.Packages.Table (New_Pkg).Decl, First_Attribute_Of @@ -2607,6 +2618,7 @@ package body Prj.Proc is Add_Attributes (Project, Name, + Name_Id (Processed_Data.Directory.Name), In_Tree, Processed_Data.Decl, Prj.Attr.Attribute_First, |