summaryrefslogtreecommitdiff
path: root/gcc/ada/prj-proc.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/prj-proc.adb')
-rw-r--r--gcc/ada/prj-proc.adb10
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;