[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Fri, 18 Jul 2014 09:46:49 +0000 (11:46 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 18 Jul 2014 09:46:49 +0000 (11:46 +0200)
2014-07-18  Robert Dewar  <dewar@adacore.com>

* lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.

2014-07-18  Vincent Celier  <celier@adacore.com>

* lib-writ.ads: Update documentation about the D lines.

From-SVN: r212796

gcc/ada/ChangeLog
gcc/ada/ali.ads
gcc/ada/lib-writ.adb
gcc/ada/lib-writ.ads
gcc/ada/makeutl.adb

index f69a570..766912b 100644 (file)
@@ -1,3 +1,11 @@
+2014-07-18  Robert Dewar  <dewar@adacore.com>
+
+       * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
+
+2014-07-18  Vincent Celier  <celier@adacore.com>
+
+       * lib-writ.ads: Update documentation about the D lines.
+
 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
 
        * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
index be5f793..66a462e 100644 (file)
@@ -768,8 +768,7 @@ package ALI is
       --  Name_Id for subunit name if present, else No_Name
 
       Unit_Name : Name_Id;
-      --  Name_Id for the unit name, if not a subunit. No_Name for a subunit.
-
+      --  Name_Id for the unit name if not a subunit (No_Name for a subunit)
       Rfile : File_Name_Type;
       --  Reference file name. Same as Sfile unless a Source_Reference pragma
       --  was used, in which case it reflects the name used in the pragma.
index 1240032..bd0ae5c 100644 (file)
@@ -426,8 +426,8 @@ package body Lib.Writ is
          --  If this is a spec ...
 
          if (Is_Subprogram (Uent)
-               or else Ekind (Uent) = E_Package
-               or else Is_Generic_Unit (Uent))
+              or else Ekind (Uent) = E_Package
+              or else Is_Generic_Unit (Uent))
 
             --  and an elaboration entity was declared ...
 
@@ -435,8 +435,7 @@ package body Lib.Writ is
 
             --  and either the elaboration flag is required ...
 
-            and then
-              (Elaboration_Entity_Required (Uent)
+            and then (Elaboration_Entity_Required (Uent)
 
                --  or this unit has elaboration code ...
 
@@ -450,9 +449,7 @@ package body Lib.Writ is
                    and then Present (Body_Entity (Uent))
                    and then
                      not Has_No_Elaboration_Code
-                           (Parent
-                             (Declaration_Node
-                               (Body_Entity (Uent))))))
+                           (Parent (Declaration_Node (Body_Entity (Uent))))))
          then
             if Convention (Uent) = Convention_CIL then
 
@@ -531,7 +528,7 @@ package body Lib.Writ is
            or else
              (Present (Library_Unit (Unode))
                 and then
-              Nkind (Unit (Library_Unit (Unode))) in N_Generic_Declaration)
+                  Nkind (Unit (Library_Unit (Unode))) in N_Generic_Declaration)
          then
             Write_Info_Str (" GE");
          end if;
@@ -576,19 +573,18 @@ package body Lib.Writ is
          if Nkind (Unit (Unode)) in N_Unit_Body then
             for S in Units.First .. Last_Unit loop
 
-               --  We are only interested in subunits.
-               --  For preproc. data and def. files, Cunit is Empty, so
-               --  we need to test that first.
+               --  We are only interested in subunits. For preproc. data and
+               --  def. files, Cunit is Empty, so we need to test that first.
 
                if Cunit (S) /= Empty
                  and then Nkind (Unit (Cunit (S))) = N_Subunit
                then
                   Pnode := Library_Unit (Cunit (S));
 
-                  --  In gnatc mode, the errors in the subunits will not
-                  --  have been recorded, but the analysis of the subunit
-                  --  may have failed. There is no information to add to
-                  --  ALI file in this case.
+                  --  In gnatc mode, the errors in the subunits will not have
+                  --  been recorded, but the analysis of the subunit may have
+                  --  failed. There is no information to add to ALI file in
+                  --  this case.
 
                   if No (Pnode) then
                      exit;
@@ -780,8 +776,8 @@ package body Lib.Writ is
             --  Add element to with table if it is with'ed or if it is the
             --  parent spec of the main unit (case of main unit is a child
             --  unit). The latter with is not needed for semantic purposes,
-            --  but is required by the binder for elaboration purposes.
-            --  For preproc. data and def. files, there is no Unit_Name,
+            --  but is required by the binder for elaboration purposes. For
+            --  preprocessing data and definition files, there is no Unit_Name,
             --  check for that first.
 
             if Unit_Name (J) /= No_Unit_Name
@@ -1057,8 +1053,8 @@ package body Lib.Writ is
             if Nkind (U) = N_Subprogram_Body
               and then Present (Corresponding_Spec (U))
               and then
-                Ekind_In (Corresponding_Spec (U),
-                  E_Generic_Procedure, E_Generic_Function)
+                Ekind_In (Corresponding_Spec (U), E_Generic_Procedure,
+                                                  E_Generic_Function)
             then
                null;
 
@@ -1183,9 +1179,7 @@ package body Lib.Writ is
       --  for which we have generated code
 
       for Unit in Units.First .. Last_Unit loop
-         if Units.Table (Unit).Generate_Code
-           or else Unit = Main_Unit
-         then
+         if Units.Table (Unit).Generate_Code or else Unit = Main_Unit then
             if not Has_No_Elaboration_Code (Cunit (Unit)) then
                Main_Restrictions.Violated (No_Elaboration_Code) := True;
             end if;
@@ -1412,8 +1406,8 @@ package body Lib.Writ is
             if Sind /= No_Source_File then
                Fname := File_Name (Sind);
 
-               --  Ensure that on platforms where the file names are not
-               --  case sensitive, the recorded file name is in lower case.
+               --  Ensure that on platforms where the file names are not case
+               --  sensitive, the recorded file name is in lower case.
 
                if not File_Names_Case_Sensitive then
                   Get_Name_String (Fname);
index dd62a69..aee3f8f 100644 (file)
@@ -767,7 +767,7 @@ package Lib.Writ is
    --  units depend. This is used by the binder for consistency checking.
    --  These lines are also referenced by the cross-reference information.
 
-   --    D source-name time-stamp checksum [subunit-name] line:file-name
+   --    D source-name time-stamp checksum (sub)unit-name line:file-name
 
    --      source-name also includes preprocessing data file and preprocessing
    --      definition file. These preprocessing files may be given as full
@@ -782,9 +782,10 @@ package Lib.Writ is
    --      The checksum is an 8-hex digit representation of the source file
    --      checksum, with letters given in lower case.
 
-   --      The subunit name is present only if the dependency line is for a
-   --      subunit. It contains the fully qualified name of the subunit in all
-   --      lower case letters.
+   --      If the unit is not a subunit, the (sub)unit name is the unit name in
+   --      internal format, as described in package Uname. If the unit is a
+   --      subunit, the (sub)unit name is the fully qualified name of the
+   --      subunit in all lower case letters.
 
    --      The line:file-name entry is present only if a Source_Reference
    --      pragma appeared in the source file identified by source-name. In
index 36b1c6a..3b72ed7 100644 (file)
@@ -320,6 +320,9 @@ package body Makeutl is
                   end;
                end if;
 
+               --  Check that a dependent source for a unit that is from a
+               --  project is indeed a source of this unit.
+
                Unit_Name := SD.Unit_Name;
 
                if Unit_Name /= No_Name