aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/lib-writ.adb
diff options
context:
space:
mode:
authorGeert Bosch <bosch@gcc.gnu.org>2001-12-17 22:07:05 +0100
committerGeert Bosch <bosch@gcc.gnu.org>2001-12-17 22:07:05 +0100
commit855ff2e1e447affef1e407fe68b9e10d525f41f5 (patch)
treea224052d9d5171d179321515f61186deba4f2b92 /gcc/ada/lib-writ.adb
parentc1c22e7a703c6e1d638195f667c9f1ce72ef6de5 (diff)
downloadgcc-855ff2e1e447affef1e407fe68b9e10d525f41f5.zip
gcc-855ff2e1e447affef1e407fe68b9e10d525f41f5.tar.gz
gcc-855ff2e1e447affef1e407fe68b9e10d525f41f5.tar.bz2
sem_ch3.adb (Analyze_Variant_Part): check that type of discriminant is discrete before analyzing choices.
* sem_ch3.adb (Analyze_Variant_Part): check that type of discriminant is discrete before analyzing choices. * bindgen.adb (Gen_Output_File_Ada): Generate a new C-like string containing the name of the Ada Main Program. This string is mainly intended for the debugger. (Gen_Output_File_C): Do the equivalent change when generating a C file. * ali.adb: Set new Dummy_Entry field in dependency entry * ali.ads: Add Dummy_Entry field to source dependency table * bcheck.adb (Check_Consistency): Ignore dummy D lines * lib-writ.adb (Writ_ALI): Write dummy D lines for missing source files * lib-writ.ads: Document dummy D lines for missing files. * types.ads: (Dummy_Time_Stamp): New value for non-existant files From-SVN: r48126
Diffstat (limited to 'gcc/ada/lib-writ.adb')
-rw-r--r--gcc/ada/lib-writ.adb74
1 files changed, 42 insertions, 32 deletions
diff --git a/gcc/ada/lib-writ.adb b/gcc/ada/lib-writ.adb
index a7039f8..c2b15d5 100644
--- a/gcc/ada/lib-writ.adb
+++ b/gcc/ada/lib-writ.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- $Revision: 1.160 $
+-- $Revision$
-- --
-- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
-- --
@@ -880,50 +880,60 @@ package body Lib.Writ is
begin
for J in 1 .. Num_Sdep loop
Unum := Sdep_Table (J);
+ Units.Table (Unum).Dependency_Num := J;
Sind := Units.Table (Unum).Source_Index;
- -- Error defence, ignore entries with no source index
+ Write_Info_Initiate ('D');
+ Write_Info_Char (' ');
- if Sind /= No_Source_File then
- Units.Table (Unum).Dependency_Num := J;
+ -- Normal case of a dependent unit entry with a source index
- if Units.Table (Unum).Dependent_Unit then
- Write_Info_Initiate ('D');
- Write_Info_Char (' ');
- Write_Info_Name (File_Name (Sind));
- Write_Info_Tab (25);
- Write_Info_Str (String (Time_Stamp (Sind)));
- Write_Info_Char (' ');
- Write_Info_Str (Get_Hex_String (Source_Checksum (Sind)));
-
- -- If subunit, add unit name, omitting the %b at the end
+ if Sind /= No_Source_File
+ and then Units.Table (Unum).Dependent_Unit
+ then
+ Write_Info_Name (File_Name (Sind));
+ Write_Info_Tab (25);
+ Write_Info_Str (String (Time_Stamp (Sind)));
+ Write_Info_Char (' ');
+ Write_Info_Str (Get_Hex_String (Source_Checksum (Sind)));
- if Present (Cunit (Unum))
- and then Nkind (Unit (Cunit (Unum))) = N_Subunit
- then
- Get_Decoded_Name_String (Unit_Name (Unum));
- Write_Info_Char (' ');
- Write_Info_Str (Name_Buffer (1 .. Name_Len - 2));
- end if;
+ -- If subunit, add unit name, omitting the %b at the end
- -- If Source_Reference pragma used output information
+ if Present (Cunit (Unum))
+ and then Nkind (Unit (Cunit (Unum))) = N_Subunit
+ then
+ Get_Decoded_Name_String (Unit_Name (Unum));
+ Write_Info_Char (' ');
+ Write_Info_Str (Name_Buffer (1 .. Name_Len - 2));
+ end if;
- if Num_SRef_Pragmas (Sind) > 0 then
- Write_Info_Char (' ');
+ -- If Source_Reference pragma used output information
- if Num_SRef_Pragmas (Sind) = 1 then
- Write_Info_Nat (Int (First_Mapped_Line (Sind)));
- else
- Write_Info_Nat (0);
- end if;
+ if Num_SRef_Pragmas (Sind) > 0 then
+ Write_Info_Char (' ');
- Write_Info_Char (':');
- Write_Info_Name (Reference_Name (Sind));
+ if Num_SRef_Pragmas (Sind) = 1 then
+ Write_Info_Nat (Int (First_Mapped_Line (Sind)));
+ else
+ Write_Info_Nat (0);
end if;
- Write_Info_EOL;
+ Write_Info_Char (':');
+ Write_Info_Name (Reference_Name (Sind));
end if;
+
+ -- Case where there is no source index (happens for missing files)
+ -- Also come here for non-dependent units.
+
+ else
+ Write_Info_Name (Unit_File_Name (Unum));
+ Write_Info_Tab (25);
+ Write_Info_Str (String (Dummy_Time_Stamp));
+ Write_Info_Char (' ');
+ Write_Info_Str (Get_Hex_String (0));
end if;
+
+ Write_Info_EOL;
end loop;
end;