diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-30 11:29:28 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-30 11:29:28 +0000 |
commit | 138d552796cb9408d77696543e8f0d7226ef3204 (patch) | |
tree | 7f7a170e1b8fa4ce7f697fa329b90ff8cc1a63df /gcc/ada/prj-conf.adb | |
parent | 70ac00ce596c08420e1e9f6bbc9f56af04d73833 (diff) | |
download | gcc-138d552796cb9408d77696543e8f0d7226ef3204.tar.gz |
2009-11-30 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Document pragma Short_Circuit
2009-11-30 Emmanuel Briot <briot@adacore.com>
* prj-conf.adb, prj-tree.adb, prj-tree.ads (Create_Attribute): Now set
the index either on the attribute or on its value, depending on the
kind of the attribute. Done to match recent changes in Prj.PP that were
not synchronized with this function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154789 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-conf.adb')
-rw-r--r-- | gcc/ada/prj-conf.adb | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/gcc/ada/prj-conf.adb b/gcc/ada/prj-conf.adb index bcf434b15e1..233f6db3f52 100644 --- a/gcc/ada/prj-conf.adb +++ b/gcc/ada/prj-conf.adb @@ -1189,8 +1189,9 @@ package body Prj.Conf is Pkg : Project_Node_Id := Empty_Node) is Attr : Project_Node_Id; - Val : Name_Id := No_Name; + Val, Expr : Name_Id := No_Name; Parent : Project_Node_Id := Config_File; + pragma Unreferenced (Attr); begin if Index /= "" then Name_Len := Index'Length; @@ -1202,22 +1203,17 @@ package body Prj.Conf is Parent := Pkg; end if; + Name_Len := Value'Length; + Name_Buffer (1 .. Name_Len) := Value; + Expr := Name_Find; + Attr := Create_Attribute (Tree => Project_Tree, Prj_Or_Pkg => Parent, Name => Name, Index_Name => Val, - Kind => Prj.Single); - - Name_Len := Value'Length; - Name_Buffer (1 .. Name_Len) := Value; - Val := Name_Find; - - Set_Expression_Of - (Attr, Project_Tree, - Enclose_In_Expression - (Create_Literal_String (Val, Project_Tree), - Project_Tree)); + Kind => Prj.Single, + Value => Create_Literal_String (Expr, Project_Tree)); end Create_Attribute; Name : Name_Id; |