aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/prj.adb
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2009-07-13 08:07:38 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2009-07-13 10:07:38 +0200
commit01e17342864c6703b95bed379229fa92080a76e8 (patch)
treebc7cf254ae29b2d8d2166f63b33b9367a65c350b /gcc/ada/prj.adb
parentfb2e11eeb0b993815c38a01b595e1d6678896578 (diff)
downloadgcc-01e17342864c6703b95bed379229fa92080a76e8.zip
gcc-01e17342864c6703b95bed379229fa92080a76e8.tar.gz
gcc-01e17342864c6703b95bed379229fa92080a76e8.tar.bz2
Minor reformatting.
From-SVN: r149547
Diffstat (limited to 'gcc/ada/prj.adb')
-rw-r--r--gcc/ada/prj.adb11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ada/prj.adb b/gcc/ada/prj.adb
index 8540898..94945c7 100644
--- a/gcc/ada/prj.adb
+++ b/gcc/ada/prj.adb
@@ -479,13 +479,18 @@ package body Prj is
In_Imported_Only : Boolean;
Base_Name : File_Name_Type) return Source_Id
is
- Result : Source_Id := No_Source;
+ Result : Source_Id := No_Source;
procedure Look_For_Sources (Proj : Project_Id; Src : in out Source_Id);
-- Look for Base_Name in the sources of Proj
+ ----------------------
+ -- Look_For_Sources --
+ ----------------------
+
procedure Look_For_Sources (Proj : Project_Id; Src : in out Source_Id) is
Iterator : Source_Iterator;
+
begin
Iterator := For_Each_Source (In_Tree => In_Tree, Project => Proj);
while Element (Iterator) /= No_Source loop
@@ -493,6 +498,7 @@ package body Prj is
Src := Element (Iterator);
return;
end if;
+
Next (Iterator);
end loop;
end Look_For_Sources;
@@ -500,9 +506,12 @@ package body Prj is
procedure For_Imported_Projects is new For_Every_Project_Imported
(State => Source_Id, Action => Look_For_Sources);
+ -- Start of processing for Find_Source
+
begin
if In_Imported_Only then
Look_For_Sources (Project, Result);
+
if Result = No_Source then
For_Imported_Projects
(By => Project,