OSDN Git Service

2009-09-17 Robert Dewar <dewar@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 Sep 2009 10:54:01 +0000 (10:54 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 Sep 2009 10:54:01 +0000 (10:54 +0000)
* exp_ch9.adb, exp_ch5.adb, exp_ch4.adb, prj-conf.adb, prj-env.ads,
prj-ext.adb: Minor reformatting

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

gcc/ada/ChangeLog
gcc/ada/exp_ch4.adb
gcc/ada/exp_ch5.adb
gcc/ada/exp_ch9.adb
gcc/ada/prj-conf.adb
gcc/ada/prj-env.ads
gcc/ada/prj-ext.adb

index d058d97..3ef5e6d 100644 (file)
@@ -1,3 +1,8 @@
+2009-09-17  Robert Dewar  <dewar@adacore.com>
+
+       * exp_ch9.adb, exp_ch5.adb, exp_ch4.adb, prj-conf.adb, prj-env.ads,
+       prj-ext.adb: Minor reformatting
+
 2009-09-17  Emmanuel Briot  <briot@adacore.com>
 
        * prj-conf.adb, prj-env.adb, prj-env.ads (Create_Temp_File): Moved to
index 49d2316..6a65e10 100644 (file)
@@ -4120,12 +4120,12 @@ package body Exp_Ch4 is
 
              Then_Statements => New_List (
                Make_Assignment_Statement (Sloc (Thenx),
-                 Name => New_Occurrence_Of (Cnn, Sloc (Thenx)),
+                 Name       => New_Occurrence_Of (Cnn, Sloc (Thenx)),
                  Expression => Relocate_Node (Thenx))),
 
              Else_Statements => New_List (
                Make_Assignment_Statement (Sloc (Elsex),
-                 Name => New_Occurrence_Of (Cnn, Sloc (Elsex)),
+                 Name       => New_Occurrence_Of (Cnn, Sloc (Elsex)),
                  Expression => Relocate_Node (Elsex))));
 
          Set_Assignment_OK (Name (First (Then_Statements (New_If))));
@@ -4134,16 +4134,15 @@ package body Exp_Ch4 is
          New_N := New_Occurrence_Of (Cnn, Loc);
 
       else
-
          --  No expansion needed, gigi handles it like a C conditional
          --  expression.
 
          return;
       end if;
 
-      --  Move the SLOC of the parent If statement to the newly created one
-      --  and change it to the SLOC of the expression which, after
-      --  expansion, will correspond to what is being evaluated.
+      --  Move the SLOC of the parent If statement to the newly created one and
+      --  change it to the SLOC of the expression which, after expansion, will
+      --  correspond to what is being evaluated.
 
       if Present (Parent (N))
         and then Nkind (Parent (N)) = N_If_Statement
@@ -4152,6 +4151,9 @@ package body Exp_Ch4 is
          Set_Sloc (Parent (N), Loc);
       end if;
 
+      --  Make sure Then_Actions and Else_Actions are appropriately moved
+      --  to the new if statement.
+
       if Present (Then_Actions (N)) then
          Insert_List_Before
            (First (Then_Statements (New_If)), Then_Actions (N));
index 39700bd..021afbf 100644 (file)
@@ -3142,8 +3142,8 @@ package body Exp_Ch5 is
    --  Second, we deal with the obvious rewriting for the cases where the
    --  condition of the IF is known at compile time to be True or False.
 
-   --  Third, we remove elsif parts which have non-empty Condition_Actions
-   --  and rewrite as independent if statements. For example:
+   --  Third, we remove elsif parts which have non-empty Condition_Actions and
+   --  rewrite as independent if statements. For example:
 
    --     if x then xs
    --     elsif y then ys
index 526a2dd..db22726 100644 (file)
@@ -835,8 +835,8 @@ package body Exp_Ch9 is
       end loop;
 
       --  If we are in a package body, the activation chain variable is
-      --  declared in the body, but the Activation_Chain_Entity is attached to
-      --  the spec.
+      --  declared in the body, but the Activation_Chain_Entity is attached
+      --  to the spec.
 
       if Nkind (P) = N_Package_Body then
          Decls := Declarations (P);
index e1b365e..bcf434b 100644 (file)
@@ -697,6 +697,7 @@ package body Prj.Conf is
             Switches : Argument_List_Access := Get_Config_Switches;
             Args     : Argument_List (1 .. 5);
             Arg_Last : Positive;
+
             Obj_Dir_Exists : Boolean := True;
 
          begin
@@ -748,12 +749,14 @@ package body Prj.Conf is
 
             if Config_File_Name = "" then
                if Obj_Dir_Exists then
-                  Args (3) := new String'
-                    (Obj_Dir & Directory_Separator & Auto_Cgpr);
+                  Args (3) :=
+                    new String'(Obj_Dir & Directory_Separator & Auto_Cgpr);
+
                else
                   declare
-                     Path_FD : File_Descriptor;
+                     Path_FD   : File_Descriptor;
                      Path_Name : Path_Name_Type;
+
                   begin
                      Prj.Env.Create_Temp_File
                        (In_Tree   => Project_Tree,
@@ -764,10 +767,13 @@ package body Prj.Conf is
                      if Path_FD /= Invalid_FD then
                         Args (3) := new String'(Get_Name_String (Path_Name));
                         GNAT.OS_Lib.Close (Path_FD);
+
                      else
                         --  We'll have an error message later on
-                        Args (3) := new String'
-                          (Obj_Dir & Directory_Separator & Auto_Cgpr);
+
+                        Args (3) :=
+                          new String'
+                            (Obj_Dir & Directory_Separator & Auto_Cgpr);
                      end if;
                   end;
                end if;
index 8cebad5..27259c2 100644 (file)
@@ -44,8 +44,7 @@ package Prj.Env is
       Path_FD   : out File_Descriptor;
       Path_Name : out Path_Name_Type;
       File_Use  : String);
-   --  Create a temporary file, and fail with an error if it could not be
-   --  created.
+   --  Create temporary file, and fail with an error if it could not be created
 
    procedure Create_Mapping_File
      (Project  : Project_Id;
index 2b41c67..9c9707c 100644 (file)
@@ -36,7 +36,7 @@ package body Prj.Ext is
    --  Indicator in the project path to indicate that the default search
    --  directories should not be added to the path
 
-   Uninitialized_Prefix   : constant String := '#' & Path_Separator;
+   Uninitialized_Prefix : constant String := '#' & Path_Separator;
    --  Prefix to indicate that the project path has not been initilized yet.
    --  Must be two characters long
 
@@ -77,7 +77,6 @@ package body Prj.Ext is
    begin
       if Tree.Project_Path = null then
          Tree.Project_Path := new String'(Uninitialized_Prefix & Path);
-
       else
          Tmp := Tree.Project_Path;
          Tree.Project_Path := new String'(Tmp.all & Path_Separator & Path);
@@ -85,12 +84,14 @@ package body Prj.Ext is
       end if;
    end Add_Search_Project_Directory;
 
+   -----------
    -- Check --
    -----------
 
    function Check
      (Tree        : Prj.Tree.Project_Node_Tree_Ref;
-      Declaration : String) return Boolean is
+      Declaration : String) return Boolean
+   is
    begin
       for Equal_Pos in Declaration'Range loop
          if Declaration (Equal_Pos) = '=' then