diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-04-19 14:18:59 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-04-19 14:18:59 +0200 |
commit | b35e5dcb14b85adb622f0f6ee4c629e9a44dcdd0 (patch) | |
tree | 404f95f515c48269fcc3d2370141e4036cc8208a /gcc/ada/lib-writ.adb | |
parent | d247f8e23afb71d88a38105d3bdc342b5ecd9edc (diff) | |
download | gcc-b35e5dcb14b85adb622f0f6ee4c629e9a44dcdd0.zip gcc-b35e5dcb14b85adb622f0f6ee4c629e9a44dcdd0.tar.gz gcc-b35e5dcb14b85adb622f0f6ee4c629e9a44dcdd0.tar.bz2 |
[multiple changes]
2016-04-19 Bob Duff <duff@adacore.com>
* sem_elab.adb (Check_A_Call): There are cases where we have No
(Ent) after the Alias loop, even when there was no previous error,
so we can't assert that there was an error.
2016-04-19 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Analyze_Access_Attribute, OK_Self_Reference):
Reject use of type name as a prefix to 'access within an aggregate
in a context that is not the declarative region of a type.
2016-04-19 Vincent Celier <celier@adacore.com>
* gnatcmd.adb: Make "gnat ls -P" invoke gprls Make "gnat bind
-P" invoke "gprbuild -b" Make "gnat link -P" invoke "gprbuild
-l" Fail if the invocation is "gnat find -P" or "gnat xref -P"
Remove anything related to project files
* g-mbdira.adb: minor whitespace cleanup
* g-spipat.adb: minor removal of extra spaces after closing paren
2016-04-19 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Actuals): If post-statements are present
and the enclosing context is a function call or indexing, build
an Expression_With_Actions for the call.
2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
* lib-writ.adb (Write_With_Lines): Code cleanup. Do not generate
a with line for an ignored Ghost unit.
* sem_ch7.adb (Analyze_Package_Declaration): Add local constant
Par. A child package is Ghost when its parent is Ghost.
* sem_prag.adb (Analyze_Pragma): Pragma Ghost can now apply to
a subprogram declaration that acts as a compilation unit.
From-SVN: r235191
Diffstat (limited to 'gcc/ada/lib-writ.adb')
-rw-r--r-- | gcc/ada/lib-writ.adb | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/gcc/ada/lib-writ.adb b/gcc/ada/lib-writ.adb index e792565..b65892a 100644 --- a/gcc/ada/lib-writ.adb +++ b/gcc/ada/lib-writ.adb @@ -747,16 +747,16 @@ package body Lib.Writ is ---------------------- procedure Write_With_Lines is - With_Table : Unit_Ref_Table (1 .. Pos (Last_Unit - Units.First + 1)); - Num_Withs : Int := 0; - Unum : Unit_Number_Type; - Cunit : Node_Id; - Uname : Unit_Name_Type; - Fname : File_Name_Type; Pname : constant Unit_Name_Type := Get_Parent_Spec_Name (Unit_Name (Main_Unit)); Body_Fname : File_Name_Type; Body_Index : Nat; + Cunit : Node_Id; + Fname : File_Name_Type; + Num_Withs : Int := 0; + Unum : Unit_Number_Type; + Uname : Unit_Name_Type; + With_Table : Unit_Ref_Table (1 .. Pos (Last_Unit - Units.First + 1)); procedure Write_With_File_Names (Nam : in out File_Name_Type; @@ -814,10 +814,18 @@ package body Lib.Writ is Sort (With_Table (1 .. Num_Withs)); for J in 1 .. Num_Withs loop - Unum := With_Table (J); - Cunit := Units.Table (Unum).Cunit; - Uname := Units.Table (Unum).Unit_Name; - Fname := Units.Table (Unum).Unit_File_Name; + Unum := With_Table (J); + + -- Do not generate a with line for an ignored Ghost unit because + -- the unit does not have an ALI file. + + if Is_Ignored_Ghost_Entity (Cunit_Entity (Unum)) then + goto Next_With_Line; + end if; + + Cunit := Units.Table (Unum).Cunit; + Uname := Units.Table (Unum).Unit_Name; + Fname := Units.Table (Unum).Unit_File_Name; if Implicit_With (Unum) = Yes then Write_Info_Initiate ('Z'); @@ -914,6 +922,9 @@ package body Lib.Writ is end if; Write_Info_EOL; + + <<Next_With_Line>> + null; end loop; -- Finally generate the special lines for cases of Restriction_Set @@ -932,7 +943,7 @@ package body Lib.Writ is for U in 0 .. Last_Unit loop if Unit_Name (U) = Unam then - goto Continue; + goto Next_Restriction_Set; end if; end loop; @@ -943,7 +954,7 @@ package body Lib.Writ is Write_Info_Name (Unam); Write_Info_EOL; - <<Continue>> + <<Next_Restriction_Set>> null; end loop; end; @@ -996,8 +1007,8 @@ package body Lib.Writ is end if; end if; - -- Otherwise acquire compilation arguments and prepare to write - -- out a new ali file. + -- Otherwise acquire compilation arguments and prepare to write out a + -- new ali file. Create_Output_Library_Info; |