OSDN Git Service

2009-06-23 Vincent Celier <celier@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 23 Jun 2009 10:01:39 +0000 (10:01 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 23 Jun 2009 10:01:39 +0000 (10:01 +0000)
* prj-attr.adb: Attribute names Initial_Required_Switches and
Final_Required_Switches changed to Leading_Required_Switches and
Trailing_Required_Switches.

* prj-nmsc.adb (Process_Compiler): Attribute names
Initial_Required_Switches and Final_Required_Switches changed to
Leading_Required_Switches and Trailing_Required_Switches.

* prj.ads (Language_Config): Component Initial_Required_Switches and
Final_Required_Switches changed to Leading_Required_Switches and
Trailing_Required_Switches.

* snames.ads-tmpl: Remove standard names Initial_Required_Switches and
Final_Required_Switches; add standard names Leading_Required_Switches
and Trailing_Required_Switches.

2009-06-23  Thomas Quinot  <quinot@adacore.com>

* prj-conf.adb: Minor reformatting

* xref_lib.adb: Minor cleanup

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148840 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/prj-attr.adb
gcc/ada/prj-conf.adb
gcc/ada/prj-nmsc.adb
gcc/ada/prj.ads
gcc/ada/snames.ads-tmpl
gcc/ada/xref_lib.adb

index 6418c11..05fe6ce 100644 (file)
@@ -1,3 +1,27 @@
+2009-06-23  Vincent Celier  <celier@adacore.com>
+
+       * prj-attr.adb: Attribute names Initial_Required_Switches and
+       Final_Required_Switches changed to Leading_Required_Switches and
+       Trailing_Required_Switches.
+
+       * prj-nmsc.adb (Process_Compiler): Attribute names
+       Initial_Required_Switches and Final_Required_Switches changed to
+       Leading_Required_Switches and Trailing_Required_Switches.
+
+       * prj.ads (Language_Config): Component Initial_Required_Switches and
+       Final_Required_Switches changed to Leading_Required_Switches and
+       Trailing_Required_Switches.
+
+       * snames.ads-tmpl: Remove standard names Initial_Required_Switches and
+       Final_Required_Switches; add standard names Leading_Required_Switches
+       and Trailing_Required_Switches.
+
+2009-06-23  Thomas Quinot  <quinot@adacore.com>
+
+       * prj-conf.adb: Minor reformatting
+
+       * xref_lib.adb: Minor cleanup
+
 2009-06-23  Emmanuel Briot  <briot@adacore.com>
 
        * prj-proc.adb, prj-proc.ads, prj-nmsc.adb, prj-nmsc.ads, prj-conf.adb,
index f22c6a7..13f0904 100644 (file)
@@ -173,8 +173,8 @@ package body Prj.Attr is
 
    "Sadriver#" &
    "Larequired_switches#" &
-   "Lainitial_required_switches#" &
-   "Lafinal_required_switches#" &
+   "Laleading_required_switches#" &
+   "Latrailing_required_switches#" &
    "Lapic_option#" &
    "Sapath_syntax#" &
    "Saobject_file_suffix#" &
index 7c60f53..6490f9f 100644 (file)
@@ -953,16 +953,16 @@ package body Prj.Conf is
       Sinput.P.Reset_First;
 
       Prj.Proc.Process_Project_Tree_Phase_2
-        (In_Tree                => Project_Tree,
-         Project                => Main_Project,
-         Success                => Success,
-         From_Project_Node      => User_Project_Node,
-         From_Project_Node_Tree => Project_Node_Tree,
-         Report_Error           => Report_Error,
-         Current_Dir            => Current_Directory,
-         When_No_Sources        => Warning,
+        (In_Tree                   => Project_Tree,
+         Project                   => Main_Project,
+         Success                   => Success,
+         From_Project_Node         => User_Project_Node,
+         From_Project_Node_Tree    => Project_Node_Tree,
+         Report_Error              => Report_Error,
+         Current_Dir               => Current_Directory,
+         When_No_Sources           => Warning,
          Compiler_Driver_Mandatory => Compiler_Driver_Mandatory,
-         Is_Config_File         => False);
+         Is_Config_File            => False);
 
       if not Success then
          Main_Project := No_Project;
index 6c38cf3..b6ec4fe 100644 (file)
@@ -280,8 +280,8 @@ package body Prj.Nmsc is
    --  Is_Config_File should be True if Project is a config file (.cgpr)
 
    procedure Check_Configuration
-     (Project : Project_Id;
-      In_Tree : Project_Tree_Ref;
+     (Project                   : Project_Id;
+      In_Tree                   : Project_Tree_Ref;
       Compiler_Driver_Mandatory : Boolean);
    --  Check the configuration attributes for the project
    --  If Compiler_Driver_Mandatory is true, then a Compiler.Driver attribute
@@ -789,13 +789,13 @@ package body Prj.Nmsc is
    -----------
 
    procedure Check
-     (Project         : Project_Id;
-      In_Tree         : Project_Tree_Ref;
-      Report_Error    : Put_Line_Access;
-      When_No_Sources : Error_Warning;
-      Current_Dir     : String;
-      Proc_Data       : in out Processing_Data;
-      Is_Config_File  : Boolean;
+     (Project                   : Project_Id;
+      In_Tree                   : Project_Tree_Ref;
+      Report_Error              : Put_Line_Access;
+      When_No_Sources           : Error_Warning;
+      Current_Dir               : String;
+      Proc_Data                 : in out Processing_Data;
+      Is_Config_File            : Boolean;
       Compiler_Driver_Mandatory : Boolean)
    is
       Extending : Boolean := False;
@@ -1138,8 +1138,8 @@ package body Prj.Nmsc is
    -------------------------
 
    procedure Check_Configuration
-     (Project : Project_Id;
-      In_Tree : Project_Tree_Ref;
+     (Project                   : Project_Id;
+      In_Tree                   : Project_Tree_Ref;
       Compiler_Driver_Mandatory : Boolean)
    is
       Dot_Replacement : File_Name_Type := No_File;
@@ -1436,17 +1436,17 @@ package body Prj.Nmsc is
                              File_Name_Type (Element.Value.Value);
 
                         when Name_Required_Switches |
-                             Name_Initial_Required_Switches =>
+                             Name_Leading_Required_Switches =>
                            Put (Into_List =>
                                   Lang_Index.Config.
-                                    Compiler_Initial_Required_Switches,
+                                    Compiler_Leading_Required_Switches,
                                 From_List => Element.Value.Values,
                                 In_Tree   => In_Tree);
 
-                        when Name_Final_Required_Switches =>
+                        when Name_Trailing_Required_Switches =>
                            Put (Into_List =>
                                   Lang_Index.Config.
-                                    Compiler_Final_Required_Switches,
+                                    Compiler_Trailing_Required_Switches,
                                 From_List => Element.Value.Values,
                                 In_Tree   => In_Tree);
 
@@ -5873,16 +5873,15 @@ package body Prj.Nmsc is
          --  No Source_Dirs specified: the single source directory is the one
          --  containing the project file
 
-         String_Element_Table.Increment_Last (In_Tree.String_Elements);
-         Project.Source_Dirs := String_Element_Table.Last
-           (In_Tree.String_Elements);
-         In_Tree.String_Elements.Table (Project.Source_Dirs) :=
+         String_Element_Table.Append (In_Tree.String_Elements,
            (Value         => Name_Id (Project.Directory.Name),
             Display_Value => Name_Id (Project.Directory.Display_Name),
             Location      => No_Location,
             Flag          => False,
             Next          => Nil_String,
-            Index         => 0);
+            Index         => 0));
+         Project.Source_Dirs := String_Element_Table.Last
+                                  (In_Tree.String_Elements);
 
          if Current_Verbosity = High then
             Write_Attr
index fb69b0c..89f097c 100644 (file)
@@ -421,11 +421,11 @@ package Prj is
       Compiler_Driver_Path : String_Access := null;
       --  The path name of the executable for the compiler of the language
 
-      Compiler_Initial_Required_Switches : Name_List_Index := No_Name_List;
+      Compiler_Leading_Required_Switches : Name_List_Index := No_Name_List;
       --  The list of initial switches that are required as a minimum to invoke
       --  the compiler driver.
 
-      Compiler_Final_Required_Switches : Name_List_Index := No_Name_List;
+      Compiler_Trailing_Required_Switches : Name_List_Index := No_Name_List;
       --  The list of final switches that are required as a minimum to invoke
       --  the compiler driver.
 
@@ -555,8 +555,8 @@ package Prj is
                            Include_Compatible_Languages => No_Name_List,
                            Compiler_Driver              => No_File,
                            Compiler_Driver_Path         => null,
-                           Compiler_Initial_Required_Switches => No_Name_List,
-                           Compiler_Final_Required_Switches   => No_Name_List,
+                           Compiler_Leading_Required_Switches  => No_Name_List,
+                           Compiler_Trailing_Required_Switches => No_Name_List,
                            Path_Syntax                  => Canonical,
                            Object_File_Suffix           => No_Name,
                            Object_File_Switches         => No_Name_List,
index 7a304fe..9d5d298 100644 (file)
@@ -1047,7 +1047,6 @@ package Snames is
    Name_Executable_Suffix                : constant Name_Id := N + $;
    Name_Extends                          : constant Name_Id := N + $;
    Name_Externally_Built                 : constant Name_Id := N + $;
-   Name_Final_Required_Switches          : constant Name_Id := N + $;
    Name_Finder                           : constant Name_Id := N + $;
    Name_Global_Compilation_Switches      : constant Name_Id := N + $;
    Name_Global_Configuration_Pragmas     : constant Name_Id := N + $;
@@ -1063,8 +1062,8 @@ package Snames is
    Name_Include_Path                     : constant Name_Id := N + $;
    Name_Include_Path_File                : constant Name_Id := N + $;
    Name_Inherit_Source_Path              : constant Name_Id := N + $;
-   Name_Initial_Required_Switches        : constant Name_Id := N + $;
    Name_Languages                        : constant Name_Id := N + $;
+   Name_Leading_Required_Switches        : constant Name_Id := N + $;
    Name_Library                          : constant Name_Id := N + $;
    Name_Library_Ali_Dir                  : constant Name_Id := N + $;
    Name_Library_Auto_Init                : constant Name_Id := N + $;
@@ -1139,6 +1138,7 @@ package Snames is
    Name_Synchronize                      : constant Name_Id := N + $;
    Name_Toolchain_Description            : constant Name_Id := N + $;
    Name_Toolchain_Version                : constant Name_Id := N + $;
+   Name_Trailing_Required_Switches       : constant Name_Id := N + $;
    Name_Runtime_Library_Dir              : constant Name_Id := N + $;
    Name_Runtime_Source_Dir               : constant Name_Id := N + $;
 
index 116f364..f3c8fa3 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1998-2008, Free Software Foundation, Inc.         --
+--          Copyright (C) 1998-2009, 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- --
@@ -481,8 +481,7 @@ package body Xref_Lib is
    function Get_Full_Type (Decl : Declaration_Reference) return String is
 
       function Param_String return String;
-      --  Return the string to display depending on whether Decl is a
-      --  parameter or not
+      --  Return the string to display depending on whether Decl is a parameter
 
       ------------------
       -- Param_String --
@@ -710,7 +709,9 @@ package body Xref_Lib is
          end loop;
 
          if Source (Ptr) /= EOF then
-            Ptr := Ptr + 1;      -- skip CR or LF
+            --  Skip CR or LF
+
+            Ptr := Ptr + 1;
          end if;
 
          --  Skip past CR/LF or LF/CR combination
@@ -1071,7 +1072,7 @@ package body Xref_Lib is
       loop
          --  Process references on current line
 
-         while Ali (Ptr) = ' ' or Ali (Ptr) = ASCII.HT loop
+         while Ali (Ptr) = ' ' or else Ali (Ptr) = ASCII.HT loop
 
             --  For every reference read the line, type and column,
             --  optionally preceded by a file number and a pipe symbol.