diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-24 10:13:43 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-24 10:13:43 +0000 |
commit | 184881699373511df96af4e8e600f78ff91da1dd (patch) | |
tree | c8c5b16b16326d1a5ee465198da9d3a35dafabb5 /gcc/ada/prj-proc.adb | |
parent | 30179878b980744914eb3620ea606698bb1daa95 (diff) | |
download | gcc-184881699373511df96af4e8e600f78ff91da1dd.tar.gz |
2009-04-24 Emmanuel Briot <briot@adacore.com>
* prj-proc.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb
(Source_Iterator): new type.
This removes the need for having the sources on three different
lists at the project tree, project and language level. They are now
on a single list.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146689 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-proc.adb')
-rw-r--r-- | gcc/ada/prj-proc.adb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/ada/prj-proc.adb b/gcc/ada/prj-proc.adb index f595fd75361..4b26a61f418 100644 --- a/gcc/ada/prj-proc.adb +++ b/gcc/ada/prj-proc.adb @@ -291,12 +291,16 @@ package body Prj.Proc is Source1 : Source_Id; Name : Name_Id; Source2 : Source_Id; + Iter : Source_Iterator; begin Unit_Htable.Reset; - Source1 := In_Tree.First_Source; - while Source1 /= No_Source loop + Iter := For_Each_Source (In_Tree); + loop + Source1 := Prj.Element (Iter); + exit when Source1 = No_Source; + Name := In_Tree.Sources.Table (Source1).Unit; if Name /= No_Name then @@ -312,7 +316,7 @@ package body Prj.Proc is end if; end if; - Source1 := In_Tree.Sources.Table (Source1).Next_In_Sources; + Next (Iter); end loop; end; end Check; |