aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2009-09-17 10:54:01 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2009-09-17 12:54:01 +0200
commit3fc5d116bc25e32ce6f8d3a11483c10dc0522d87 (patch)
tree34c068ddfa97992b3819069c9d88729d1be9bebf /gcc
parent1c6b973ab5d66121ae4723209b7cbbc47d4d6ad8 (diff)
downloadgcc-3fc5d116bc25e32ce6f8d3a11483c10dc0522d87.zip
gcc-3fc5d116bc25e32ce6f8d3a11483c10dc0522d87.tar.gz
gcc-3fc5d116bc25e32ce6f8d3a11483c10dc0522d87.tar.bz2
exp_ch9.adb, [...]: Minor reformatting
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 From-SVN: r151796
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/exp_ch4.adb14
-rw-r--r--gcc/ada/exp_ch5.adb4
-rw-r--r--gcc/ada/exp_ch9.adb4
-rw-r--r--gcc/ada/prj-conf.adb16
-rw-r--r--gcc/ada/prj-env.ads3
-rw-r--r--gcc/ada/prj-ext.adb7
7 files changed, 33 insertions, 20 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index d058d97..3ef5e6d 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -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
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 49d2316..6a65e10 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -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));
diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb
index 39700bd..021afbf 100644
--- a/gcc/ada/exp_ch5.adb
+++ b/gcc/ada/exp_ch5.adb
@@ -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
diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb
index 526a2dd..db22726 100644
--- a/gcc/ada/exp_ch9.adb
+++ b/gcc/ada/exp_ch9.adb
@@ -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);
diff --git a/gcc/ada/prj-conf.adb b/gcc/ada/prj-conf.adb
index e1b365e..bcf434b 100644
--- a/gcc/ada/prj-conf.adb
+++ b/gcc/ada/prj-conf.adb
@@ -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;
diff --git a/gcc/ada/prj-env.ads b/gcc/ada/prj-env.ads
index 8cebad5..27259c2 100644
--- a/gcc/ada/prj-env.ads
+++ b/gcc/ada/prj-env.ads
@@ -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;
diff --git a/gcc/ada/prj-ext.adb b/gcc/ada/prj-ext.adb
index 2b41c67..9c9707c 100644
--- a/gcc/ada/prj-ext.adb
+++ b/gcc/ada/prj-ext.adb
@@ -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