sem_ch3.ads, [...]: Minor reformatting.
authorRobert Dewar <dewar@adacore.com>
Wed, 30 Jul 2014 14:25:36 +0000 (14:25 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 30 Jul 2014 14:25:36 +0000 (16:25 +0200)
2014-07-30  Robert Dewar  <dewar@adacore.com>

* sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.

From-SVN: r213283

gcc/ada/ChangeLog
gcc/ada/prj-nmsc.adb
gcc/ada/prj.ads
gcc/ada/sem_ch3.ads

index 191b17b636d6d6a21e246ddbe8330915420d7a4a..cd83b8118233197f41f38adcbb2b0ef04cfb97d2 100644 (file)
@@ -1,3 +1,7 @@
+2014-07-30  Robert Dewar  <dewar@adacore.com>
+
+       * sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.
+
 2014-07-30  Robert Dewar  <dewar@adacore.com>
 
        * par-ch5.adb (P_Sequence_Of_Statements): Properly handle
index 6f8b7133c8aba4d0fba74652c8b1bcd13a5f9820..c975e1981b85726bf9c427528c0c6fe5d7324b11 100644 (file)
@@ -547,12 +547,9 @@ package body Prj.Nmsc is
       while J <= Str'Last loop
          Name_Len := Name_Len + 1;
 
-         if J <= Max
-           and then Str (J .. J + Pattern'Length - 1) = Pattern
-         then
+         if J <= Max and then Str (J .. J + Pattern'Length - 1) = Pattern then
             Name_Buffer (Name_Len) := Replacement;
             J := J + Pattern'Length;
-
          else
             Name_Buffer (Name_Len) := GNAT.Case_Util.To_Lower (Str (J));
             J := J + 1;
@@ -738,8 +735,7 @@ package body Prj.Nmsc is
                --  the same file name in unrelated projects.
 
             elsif Is_Extending (Project, Source.Project) then
-               if not Locally_Removed
-                 and then Naming_Exception /= Inherited
+               if not Locally_Removed and then Naming_Exception /= Inherited
                then
                   Source_To_Replace := Source;
                end if;
@@ -2403,7 +2399,8 @@ package body Prj.Nmsc is
                         Lang_Index.Config.Toolchain_Version :=
                           Element.Value.Value;
 
-                        --  For Ada, set proper checksum computation mode
+                        --  For Ada, set proper checksum computation mode,
+                        --  which has changed from version to version.
 
                         if Lang_Index.Name = Name_Ada then
                            declare
@@ -2432,7 +2429,7 @@ package body Prj.Nmsc is
                                  then
                                     Checksum_GNAT_5_03 := True;
 
-                                    --  Version 5.02 or earlier
+                                    --  Version 5.02 or earlier (no checksums)
 
                                     if Vers (6) /= '5'
                                       or else Vers (Vers'Last) < '3'
@@ -3355,7 +3352,7 @@ package body Prj.Nmsc is
 
       Project.Library :=
         Project.Library_Dir /= No_Path_Information
-        and then Project.Library_Name /= No_Name;
+          and then Project.Library_Name /= No_Name;
 
       if Project.Extends = No_Project then
          case Project.Qualifier is
@@ -5016,7 +5013,7 @@ package body Prj.Nmsc is
 
                   Error_Msg_Warn :=
                     Project.Symbol_Data.Symbol_Policy /= Controlled
-                    and then Project.Symbol_Data.Symbol_Policy /= Direct;
+                      and then Project.Symbol_Data.Symbol_Policy /= Direct;
 
                   Error_Msg
                     (Data.Flags,
@@ -5432,12 +5429,10 @@ package body Prj.Nmsc is
       No_Sources : constant Boolean :=
                      ((not Source_Files.Default
                         and then Source_Files.Values = Nil_String)
-                      or else
-                        (not Source_Dirs.Default
-                          and then Source_Dirs.Values = Nil_String)
-                      or else
-                        (not Languages.Default
-                          and then Languages.Values = Nil_String))
+                       or else (not Source_Dirs.Default
+                                 and then Source_Dirs.Values = Nil_String)
+                       or else (not Languages.Default
+                                 and then Languages.Values = Nil_String))
                      and then Project.Extends = No_Project;
 
    --  Start of processing for Get_Directories
@@ -5502,6 +5497,7 @@ package body Prj.Nmsc is
 
             if not Dir_Exists and then not Project.Externally_Built then
                if Opt.Directories_Must_Exist_In_Projects then
+
                   --  The object directory does not exist, report an error if
                   --  the project is not externally built.
 
@@ -5613,8 +5609,7 @@ package body Prj.Nmsc is
 
       pragma Assert (Source_Dirs.Kind = List, "Source_Dirs is not a list");
 
-      if not Source_Files.Default
-        and then Source_Files.Values = Nil_String
+      if not Source_Files.Default and then Source_Files.Values = Nil_String
       then
          Project.Source_Dirs := Nil_String;
 
@@ -5779,9 +5774,7 @@ package body Prj.Nmsc is
 
             --  A non empty, non comment line should contain a file name
 
-            if Last /= 0
-              and then (Last = 1 or else Line (1 .. 2) /= "--")
-            then
+            if Last /= 0 and then (Last = 1 or else Line (1 .. 2) /= "--") then
                Name_Len := Last;
                Name_Buffer (1 .. Name_Len) := Line (1 .. Last);
                Canonical_Case_File_Name (Name_Buffer (1 .. Name_Len));
@@ -5964,20 +5957,15 @@ package body Prj.Nmsc is
       --  In the standard GNAT naming scheme, check for special cases: children
       --  or separates of A, G, I or S, and run time sources.
 
-      if Is_Standard_GNAT_Naming (Naming)
-        and then Name_Len >= 3
-      then
+      if Is_Standard_GNAT_Naming (Naming) and then Name_Len >= 3 then
          declare
             S1 : constant Character := Name_Buffer (1);
             S2 : constant Character := Name_Buffer (2);
             S3 : constant Character := Name_Buffer (3);
 
          begin
-            if        S1 = 'a'
-              or else S1 = 'g'
-              or else S1 = 'i'
-              or else S1 = 's'
-            then
+            if S1 = 'a' or else S1 = 'g' or else S1 = 'i' or else S1 = 's' then
+
                --  Children or separates of packages A, G, I or S. These names
                --  are x__ ... or x~... (where x is a, g, i, or s). Both
                --  versions (x__... and x~...) are allowed in all platforms,
@@ -6045,9 +6033,7 @@ package body Prj.Nmsc is
          end if;
       end if;
 
-      if Unit /= No_Name
-        and then Current_Verbosity = High
-      then
+      if Unit /= No_Name and then Current_Verbosity = High then
          case Kind is
             when Spec => Debug_Output ("spec of", Unit);
             when Impl => Debug_Output ("body of", Unit);
@@ -6507,8 +6493,7 @@ package body Prj.Nmsc is
                if Project.Project.Extends = No_Project
                  and then
                    Project.Project.Object_Directory = Project.Project.Directory
-                 and then
-                   not (Project.Project.Qualifier = Aggregate_Library)
+                 and then not (Project.Project.Qualifier = Aggregate_Library)
                then
                   Project.Project.Object_Directory := No_Path_Information;
                end if;
@@ -6638,7 +6623,9 @@ package body Prj.Nmsc is
                        (Project.Source_Names, Source.File);
 
                      if NL /= No_Name_Location and then not NL.Listed then
+
                         --  Remove the exception
+
                         Source_Names_Htable.Set
                           (Project.Source_Names,
                            Source.File,
@@ -6983,9 +6970,7 @@ package body Prj.Nmsc is
 
       Source.Kind := Kind;
 
-      if Current_Verbosity = High
-        and then Source.File /= No_File
-      then
+      if Current_Verbosity = High and then Source.File /= No_File then
          Debug_Output ("override kind for "
                        & Get_Name_String (Source.File)
                        & " idx=" & Source.Index'Img
@@ -7154,8 +7139,7 @@ package body Prj.Nmsc is
 
             --  A file name in a list must be a source of a language
 
-            if Data.Flags.Error_On_Unknown_Language
-              and then Name_Loc.Found
+            if Data.Flags.Error_On_Unknown_Language and then Name_Loc.Found
             then
                Error_Msg_File_1 := File_Name;
                Error_Msg
@@ -7322,10 +7306,7 @@ package body Prj.Nmsc is
             Read (Dir, Name, Last);
             exit when Last = 0;
 
-            if Name (1 .. Last) /= "."
-                 and then
-               Name (1 .. Last) /= ".."
-            then
+            if Name (1 .. Last) /= "." and then Name (1 .. Last) /= ".." then
                declare
                   Path_Name : constant String :=
                     Normalize_Pathname
@@ -7333,8 +7314,9 @@ package body Prj.Nmsc is
                        Directory      => Path_Str,
                        Resolve_Links  => Resolve_Links)
                     & Directory_Separator;
-                  Path2     : Path_Information;
-                  OK        : Boolean := True;
+
+                  Path2 : Path_Information;
+                  OK    : Boolean := True;
 
                begin
                   if Is_Directory (Path_Name) then
@@ -7446,8 +7428,8 @@ package body Prj.Nmsc is
            Pattern_End - 1 >= Pattern'First
            and then Pattern (Pattern_End - 1 .. Pattern_End) = "**"
            and then (Pattern_End - 1 = Pattern'First
-                     or else Pattern (Pattern_End - 2) = '/'
-                     or else Pattern (Pattern_End - 2) = Directory_Separator);
+                      or else Pattern (Pattern_End - 2) = '/'
+                      or else Pattern (Pattern_End - 2) = Directory_Separator);
 
          if Recursive then
             Pattern_End := Pattern_End - 2;
@@ -7820,9 +7802,7 @@ package body Prj.Nmsc is
          Continuation : Boolean := False;
          Iter         : Source_Iterator;
       begin
-         if not Project.Project.Externally_Built
-           and then not Extending
-         then
+         if not Project.Project.Externally_Built and then not Extending then
             Language := Project.Project.Languages;
             while Language /= No_Language_Index loop
 
@@ -8137,11 +8117,9 @@ package body Prj.Nmsc is
             --  unit name is not null.
 
             if Src.Kind /= Sep and then Src.Unit_Name /= No_Name then
-
                declare
                   UData : Unit_Index :=
-                            Units_Htable.Get
-                              (Data.Tree.Units_HT, Src.Unit_Name);
+                    Units_Htable.Get (Data.Tree.Units_HT, Src.Unit_Name);
                begin
                   if UData = No_Unit_Index then
                      UData := new Unit_Data;
index 83c9c89cba2ffbc0cdc46e6d09cae740e1db6f1d..8ad6143ecd7e84b0d0e25ca7c771837d594b57ef 100644 (file)
@@ -1952,7 +1952,6 @@ package Prj is
    --  indentation level only affects output done through Debug_Output.
 
 private
-
    All_Packages : constant String_List_Access := null;
 
    No_Project_Tree : constant Project_Tree_Ref := null;
@@ -1992,14 +1991,18 @@ private
       Last : in out Natural);
    --  Append a String to the Buffer
 
+   --  Table used to store the path name of all the created temporary files, so
+   --  that they can be deleted at the end, or when the program is interrupted.
+
    package Temp_Files_Table is new GNAT.Dynamic_Tables
      (Table_Component_Type => Path_Name_Type,
       Table_Index_Type     => Integer,
       Table_Low_Bound      => 1,
       Table_Initial        => 10,
       Table_Increment      => 10);
-   --  Table to store the path name of all the created temporary files, so that
-   --  they can be deleted at the end, or when the program is interrupted.
+
+   --  The following type is used to represent the part of a project tree which
+   --  is private to the Project Manager.
 
    type Private_Project_Tree_Data is record
       Temp_Files   : Temp_Files_Table.Instance;
@@ -2017,10 +2020,10 @@ private
       --  Current value of project object path file env var. Used to avoid
       --  setting the env var to the same value.
       --  gnatmake only
-
    end record;
-   --  Type to represent the part of a project tree which is private to the
-   --  Project Manager.
+
+   --  The following type is used to hold processing flags which show what
+   --  functions are required for the various tools that are handled.
 
    type Processing_Flags is record
       Require_Sources_Other_Lang : Boolean;
index a0b37ea0a5bd4b82716f560f85267428869fefe2..70b201d405521d4fbc0326de3d3b1ce67960b261 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2013, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2014, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -196,8 +196,8 @@ package Sem_Ch3 is
      (I            : Node_Id;
       Related_Nod  : Node_Id;
       Related_Id   : Entity_Id := Empty;
-      Suffix_Index : Nat := 1;
-      In_Iter_Schm : Boolean := False);
+      Suffix_Index : Nat       := 1;
+      In_Iter_Schm : Boolean   := False);
    --  Process an index that is given in an array declaration, an entry
    --  family declaration or a loop iteration. The index is given by an
    --  index declaration (a 'box'), or by a discrete range. The later can