diff options
author | Emmanuel Briot <briot@adacore.com> | 2009-07-27 14:39:51 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-07-27 16:39:51 +0200 |
commit | e7f10ba9cf82ec84040b6eb378e55ca8bb3b6477 (patch) | |
tree | 9eea548b2a80f8f69ae59587cd6b3db14a41e773 | |
parent | fc53fe76ccbb60528aeb790474c3ac0c20e14680 (diff) | |
download | gcc-e7f10ba9cf82ec84040b6eb378e55ca8bb3b6477.zip gcc-e7f10ba9cf82ec84040b6eb378e55ca8bb3b6477.tar.gz gcc-e7f10ba9cf82ec84040b6eb378e55ca8bb3b6477.tar.bz2 |
prj.ads, [...] (Override_Kind): add debug trace Add comments.
2009-07-27 Emmanuel Briot <briot@adacore.com>
* prj.ads, prj-nmsc.adb (Override_Kind): add debug trace
Add comments.
From-SVN: r150121
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/prj-nmsc.adb | 31 |
2 files changed, 29 insertions, 7 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 16e985a..bf78d8c 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2009-07-27 Emmanuel Briot <briot@adacore.com> + + * prj.ads, prj-nmsc.adb (Override_Kind): add debug trace + Add comments. + 2009-07-27 Sergey Rybin <rybin@adacore.com> * gnat_ugn.texi: gnatcheck Unconstrained_Array_Returns rule: Add to the diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb index f0ded90..ee74ad7 100644 --- a/gcc/ada/prj-nmsc.adb +++ b/gcc/ada/prj-nmsc.adb @@ -726,11 +726,27 @@ package body Prj.Nmsc is Id.Kind := Kind; Id.Alternate_Languages := Alternate_Languages; Id.Locally_Removed := Locally_Removed; + Id.Index := Index; + Id.File := File_Name; + Id.Display_File := Display_File; + Id.Dep_Name := Dependency_Name + (File_Name, Lang_Id.Config.Dependency_Kind); + Id.Naming_Exception := Naming_Exception; -- Add the source id to the Unit_Sources_HT hash table, if the unit name -- is not null. if Unit /= No_Name then + -- Note: we might be creating a dummy unit here, when we in fact have + -- a separate. For instance, file file-bar.adb will initially be + -- assumed to be the IMPL of unit "file.bar". Only later on (in + -- Check_Object_Files) will we parse those units that only have an + -- impl and no spec to make sure whether we have a Separate in fact + -- (that significantly reduces the number of times we need to parse + -- the files, since we are then only interested in those with no + -- spec). We still need those dummy units in the table, since that's + -- the name we find in the ALI file + UData := Units_Htable.Get (Data.Tree.Units_HT, Unit); if UData = No_Unit_Index then @@ -746,13 +762,6 @@ package body Prj.Nmsc is Override_Kind (Id, Kind); end if; - Id.Index := Index; - Id.File := File_Name; - Id.Display_File := Display_File; - Id.Dep_Name := Dependency_Name - (File_Name, Lang_Id.Config.Dependency_Kind); - Id.Naming_Exception := Naming_Exception; - if Is_Compilable (Id) and then Config.Object_Generated then Id.Object := Object_Name (File_Name, Config.Object_File_Suffix); Id.Switches := Switches_Name (File_Name); @@ -6541,6 +6550,14 @@ package body Prj.Nmsc is Source.Kind := Kind; + if Current_Verbosity = High + and then Source.File /= No_File + then + Write_Line ("Override kind for " + & Get_Name_String (Source.File) + & " kind=" & Source.Kind'Img); + end if; + if Source.Kind in Spec_Or_Body and then Source.Unit /= null then Source.Unit.File_Names (Source.Kind) := Source; end if; |