diff options
Diffstat (limited to 'gcc/ada/lib-writ.adb')
-rw-r--r-- | gcc/ada/lib-writ.adb | 52 |
1 files changed, 45 insertions, 7 deletions
diff --git a/gcc/ada/lib-writ.adb b/gcc/ada/lib-writ.adb index 8314bd9c79e..8cf1e1ee8b4 100644 --- a/gcc/ada/lib-writ.adb +++ b/gcc/ada/lib-writ.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2003 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2004 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- -- @@ -41,6 +41,7 @@ with Osint; use Osint; with Osint.C; use Osint.C; with Par; with Restrict; use Restrict; +with Rident; use Rident; with Scn; use Scn; with Sinfo; use Sinfo; with Sinput; use Sinput; @@ -645,7 +646,14 @@ package body Lib.Writ is if Is_Spec_Name (Uname) then Body_Fname := - Get_File_Name (Get_Body_Name (Uname), Subunit => False); + Get_File_Name + (Get_Body_Name (Uname), + Subunit => False, May_Fail => True); + + if Body_Fname = No_File then + Body_Fname := Get_File_Name (Uname, Subunit => False); + end if; + else Body_Fname := Get_File_Name (Uname, Subunit => False); end if; @@ -910,20 +918,21 @@ package body Lib.Writ is or else Unit = Main_Unit then if not Has_No_Elaboration_Code (Cunit (Unit)) then - Violations (No_ELaboration_Code) := True; + Main_Restrictions.Violated (No_Elaboration_Code) := True; + Main_Restrictions.Count (No_Elaboration_Code) := -1; end if; end if; end loop; - -- Output restrictions line + -- Output first restrictions line Write_Info_Initiate ('R'); Write_Info_Char (' '); - for J in All_Restrictions loop - if Main_Restrictions (J) then + for R in All_Boolean_Restrictions loop + if Main_Restrictions.Set (R) then Write_Info_Char ('r'); - elsif Violations (J) then + elsif Main_Restrictions.Violated (R) then Write_Info_Char ('v'); else Write_Info_Char ('n'); @@ -932,6 +941,35 @@ package body Lib.Writ is Write_Info_EOL; + -- Output second restrictions line + + Write_Info_Initiate ('R'); + Write_Info_Char (' '); + + for RP in All_Parameter_Restrictions loop + if Main_Restrictions.Set (RP) then + Write_Info_Char ('r'); + Write_Info_Nat (Nat (Main_Restrictions.Value (RP))); + else + Write_Info_Char ('n'); + end if; + + if not Main_Restrictions.Violated (RP) + or else RP not in Checked_Parameter_Restrictions + then + Write_Info_Char ('n'); + else + Write_Info_Char ('v'); + Write_Info_Nat (Nat (Main_Restrictions.Count (RP))); + + if Main_Restrictions.Unknown (RP) then + Write_Info_Char ('+'); + end if; + end if; + end loop; + + Write_Info_EOL; + -- Output interrupt state lines for J in Interrupt_States.First .. Interrupt_States.Last loop |