diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-24 13:59:23 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-24 13:59:23 +0000 |
commit | 8cd3c004e511401d7003126f45fcd8fb40b82708 (patch) | |
tree | 96fd56588b8a31258591454a7a355551de0d5526 /gcc/ada/lib-load.adb | |
parent | 892bc8308b7306f9c16e7ed32f9058efc06032d5 (diff) | |
download | gcc-8cd3c004e511401d7003126f45fcd8fb40b82708.tar.gz |
2009-04-24 Emmanuel Briot <briot@adacore.com>
* prj.adb, prj.ads, prj-nmsc.adb (Check_File, Record_Ada_Source,
Add_Source): merge some code between those. In particular change where
file normalization is done to avoid a few extra calls to
Canonicalize_File_Name. This also removes the need for passing
Current_Dir in a number of subprograms.
2009-04-24 Bob Duff <duff@adacore.com>
* lib-load.adb (Make_Instance_Unit): In the case where In_Main is
False, assign the correct unit to the Cunit field of the new table
entry. We want the spec unit, not the body unit.
* rtsfind.adb (Make_Unit_Name, Maybe_Add_With): Simplify calling
interface for these.
(Maybe_Add_With): Check whether we're trying to a with on the current
unit, and avoid creating such directly self-referential with clauses.
(Text_IO_Kludge): Add implicit with's for the generic pseudo-children of
[[Wide_]Wide_]Text_IO. These are needed for Walk_Library_Items,
and matches existing comments in the spec.
* sem.adb (Walk_Library_Items): Add various special cases to make the
assertions pass.
* sem_ch12.adb (Build_Instance_Compilation_Unit_Nodes): Use Body_Cunit
instead of Parent (N), for uniformity.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146724 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/lib-load.adb')
-rw-r--r-- | gcc/ada/lib-load.adb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ada/lib-load.adb b/gcc/ada/lib-load.adb index dcd4e12773e..43a39dc8a1e 100644 --- a/gcc/ada/lib-load.adb +++ b/gcc/ada/lib-load.adb @@ -812,7 +812,16 @@ package body Lib.Load is -- units table when first loaded as a declaration. Units.Table (Units.Last) := Units.Table (Get_Cunit_Unit_Number (N)); - Units.Table (Units.Last).Cunit := N; + + -- The correct Cunit is the spec -- Library_Unit (N). But that causes + -- gnatmake to fail in certain cases, so this is under control of + -- Inspector_Mode for now. ??? + + if Inspector_Mode then + Units.Table (Units.Last).Cunit := Library_Unit (N); + else + Units.Table (Units.Last).Cunit := N; + end if; end if; end Make_Instance_Unit; |