lib-load.adb: MInor reformatting
authorRobert Dewar <dewar@adacore.com>
Wed, 22 Apr 2009 09:50:01 +0000 (09:50 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 22 Apr 2009 09:50:01 +0000 (11:50 +0200)
2009-04-22  Robert Dewar  <dewar@adacore.com>

* lib-load.adb: MInor reformatting

* lib-load.ads: Minor reformatting

* sinfo.ads: Minor reformatting

From-SVN: r146557

gcc/ada/ChangeLog
gcc/ada/lib-load.adb
gcc/ada/lib-load.ads
gcc/ada/sinfo.ads

index bcd2dd9c92e12a3b38f1d983199432d90a1ff4db..ea30d6d834e4684463df6755dabb709f0bcfb2a1 100644 (file)
@@ -1,3 +1,11 @@
+2009-04-22  Robert Dewar  <dewar@adacore.com>
+
+       * lib-load.adb: MInor reformatting
+
+       * lib-load.ads: Minor reformatting
+
+       * sinfo.ads: Minor reformatting
+
 2009-04-22  Bob Duff  <duff@adacore.com>
 
        * exp_pakd.adb: Minor comment fixes.
index c582e1e58416931f191114431746ecc82221fc22..0bce92577cd39aeb77248d9596b1311288a8ae9d 100644 (file)
@@ -768,6 +768,7 @@ package body Lib.Load is
 
    procedure Make_Instance_Unit (N : Node_Id; In_Main : Boolean) is
       Sind : constant Source_File_Index := Source_Index (Main_Unit);
+
    begin
       Units.Increment_Last;
 
@@ -782,9 +783,11 @@ package body Lib.Load is
          Units.Table (Main_Unit).Version        := Source_Checksum (Sind);
 
       else
-         --  Duplicate information from instance unit, for the body.
-         Units.Table (Units.Last) :=
-           Units.Table (Get_Cunit_Unit_Number (Library_Unit (N)));
+         --  Duplicate information from instance unit, for the body
+         --  The unit node N has been rewritten as a body, but it was placed
+         --  in the 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;
       end if;
    end Make_Instance_Unit;
index 088cc38249943bd72d56dc8f3c4c38c22ae3c485..fe1fd6eaeb210720469c826f69954428304b2140 100644 (file)
@@ -176,6 +176,7 @@ package Lib.Load is
    --  We create an additional entry for the body, so that the binder can
    --  generate the proper elaboration calls to both. The argument N is the
    --  compilation unit node created for the body.
+   --
    --  If the instance is not the main program, we still generate the instance
    --  body even though we do not generate code for it. In that case we still
    --  generate a compilation unit node for it, and we need to make an entry
index df677a44473d5426bbb3005cc55e6e895a06b1de..d45b4b039ba1d26d9e115c2c0feccf4d2a1a6271 100644 (file)
@@ -33,8 +33,8 @@
 --  package provides a basic tree structure. Sinfo describes how this structure
 --  is used to represent the syntax of an Ada program.
 
---  The grammar in the RM is followed very closely in the tree
---  design, and is repeated as part of this source file.
+--  The grammar in the RM is followed very closely in the tree design, and is
+--  repeated as part of this source file.
 
 --  The tree contains not only the full syntactic representation of the
 --  program, but also the results of semantic analysis. In particular, the