summaryrefslogtreecommitdiff
path: root/gcc/ada/gnatbind.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/gnatbind.adb')
-rw-r--r--gcc/ada/gnatbind.adb24
1 files changed, 23 insertions, 1 deletions
diff --git a/gcc/ada/gnatbind.adb b/gcc/ada/gnatbind.adb
index 48eceb0ff77..fb3dc3d74ba 100644
--- a/gcc/ada/gnatbind.adb
+++ b/gcc/ada/gnatbind.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -838,6 +838,28 @@ begin
end if;
end loop;
+ -- Subunits do not appear in the elaboration table because they
+ -- are subsumed by their parent units, but we need to list them
+ -- for other tools. For now they are listed after other files,
+ -- rather than right after their parent, since there is no easy
+ -- link between the elaboration table and the ALIs table ???
+ -- Note also that subunits may appear repeatedly in the list,
+ -- if the parent unit appears in the context of several units
+ -- in the closure.
+
+ for J in Sdep.First .. Sdep.Last loop
+ if Sdep.Table (J).Subunit_Name /= No_Name
+ and then not Is_Internal_File_Name (Sdep.Table (J).Sfile)
+ then
+ if not Zero_Formatting then
+ Write_Str (" ");
+ end if;
+
+ Write_Str (Get_Name_String (Sdep.Table (J).Sfile));
+ Write_Eol;
+ end if;
+ end loop;
+
if not Zero_Formatting then
Write_Eol;
end if;