diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-30 15:15:32 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-30 15:15:32 +0000 |
commit | 30f472afd9da36b6c8168d6759ec4a4555c137a2 (patch) | |
tree | 0656ba3aee338b7a7fcddd8348d9174e207cf1ad /gcc/ada/prj-proc.adb | |
parent | 2fac8a3a943075849110a859da7a85b2ab732dd6 (diff) | |
download | gcc-30f472afd9da36b6c8168d6759ec4a4555c137a2.tar.gz |
2014-07-30 Arnaud Charlet <charlet@adacore.com>
* set_targ.adb (Read_Target_Dependent_Values): New subprogram.
(elab body): Add provision for default target config file.
* get_targ.ads, get_targ.adb (Get_Back_End_Config_File): New subprogram.
2014-07-30 Ed Schonberg <schonberg@adacore.com>
* a-cbhase.adb (Delete): Raise Constraint_Error, not Program_Error,
when attempting to remove an element not in the set. This is
the given semantics for all set containers.
* a-cborse.adb (Delete): Attempt removal first, to check for
tampering, before checking whether this is an attempt to
delete a non-existing element, and in fthe latter case raise
Constraint_Error.
2014-07-30 Vincent Celier <celier@adacore.com>
* prj-proc.adb (Recursive_Process): Do not create a new
Project_Id if the project is already in the list of projects of
the tree.
2014-07-30 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Function_Return): Reject a return expression
whose type is an incomplete formal type.
(Analyze_Return_Type): Reject a return type that is an untagged
imcomplete formal type.
(Process_Formals): Reject a formal parameter whose type is an
untagged formal incomplete type.
* sem_res.adb (Resolve_Actuals): Reject an actual whose type is
an untagged formal incomplete type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213299 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-proc.adb')
-rw-r--r-- | gcc/ada/prj-proc.adb | 50 |
1 files changed, 36 insertions, 14 deletions
diff --git a/gcc/ada/prj-proc.adb b/gcc/ada/prj-proc.adb index 5ba318c3e6f..561f4ec1e1c 100644 --- a/gcc/ada/prj-proc.adb +++ b/gcc/ada/prj-proc.adb @@ -2845,20 +2845,42 @@ package body Prj.Proc is return; end if; - Project := - new Project_Data' - (Empty_Project - (Project_Qualifier_Of - (From_Project_Node, From_Project_Node_Tree))); - - -- Note that at this point we do not know yet if the project has - -- been withed from an encapsulated library or not. - - In_Tree.Projects := - new Project_List_Element' - (Project => Project, - From_Encapsulated_Lib => False, - Next => In_Tree.Projects); + -- Check if the project is already in the tree + + Project := No_Project; + declare + List : Project_List := In_Tree.Projects; + Path : constant Path_Name_Type := + Path_Name_Of (From_Project_Node, + From_Project_Node_Tree); + + begin + while List /= null loop + if List.Project.Path.Display_Name = Path then + Project := List.Project; + exit; + end if; + + List := List.Next; + end loop; + end; + + if Project = No_Project then + Project := + new Project_Data' + (Empty_Project + (Project_Qualifier_Of + (From_Project_Node, From_Project_Node_Tree))); + + -- Note that at this point we do not know yet if the project + -- has been withed from an encapsulated library or not. + + In_Tree.Projects := + new Project_List_Element' + (Project => Project, + From_Encapsulated_Lib => False, + Next => In_Tree.Projects); + end if; -- Keep track of this point |