diff options
-rw-r--r-- | gcc/ada/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/ada/exp_aggr.adb | 7 | ||||
-rw-r--r-- | gcc/ada/exp_ch4.adb | 2 | ||||
-rw-r--r-- | gcc/ada/exp_ch7.adb | 5 | ||||
-rw-r--r-- | gcc/ada/exp_util.adb | 15 | ||||
-rw-r--r-- | gcc/ada/opt.ads | 2 | ||||
-rw-r--r-- | gcc/ada/tbuild.adb | 6 | ||||
-rw-r--r-- | gcc/ada/tbuild.ads | 5 |
8 files changed, 31 insertions, 21 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index fa15e6c..e4b6bf6 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,13 @@ +2009-07-15 Robert Dewar <dewar@adacore.com> + + * exp_ch7.adb, exp_util.adb, tbuild.adb, tbuild.ads, exp_ch4.adb, + exp_aggr.adb: Minor code reorganization (better calling sequence for + Make_Temporary). + +2009-07-15 Thomas Quinot <quinot@adacore.com> + + * opt.ads: Minor comment edits + 2009-07-15 Tristan Gingold <gingold@adacore.com> * gcc-interface/Makefile.in: Special rule for seh_init.o no longer diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index 6946638..dfb164b 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -2996,8 +2996,7 @@ package body Exp_Aggr is -- Create a temporary array of the above subtype which -- will be used to capture the aggregate assignments. - TmpE : constant Entity_Id := - Make_Temporary (Loc, New_Internal_Name ('A'), N); + TmpE : constant Entity_Id := Make_Temporary (Loc, 'A', N); TmpD : constant Node_Id := Make_Object_Declaration (Loc, @@ -3587,7 +3586,7 @@ package body Exp_Aggr is Rewrite (Parent (N), Make_Null_Statement (Loc)); else - Temp := Make_Temporary (Loc, New_Internal_Name ('A'), N); + Temp := Make_Temporary (Loc, 'A', N); -- If the type inherits unknown discriminants, use the view with -- known discriminants if available. @@ -5202,7 +5201,7 @@ package body Exp_Aggr is else Maybe_In_Place_OK := False; - Tmp := Make_Temporary (Loc, New_Internal_Name ('A'), N); + Tmp := Make_Temporary (Loc, 'A', N); Tmp_Decl := Make_Object_Declaration (Loc, diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index f8f2caa..8343ea1 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -4043,7 +4043,7 @@ package body Exp_Ch4 is -- and replace the conditional expresion by a reference to Cnn.all ??? if Present (Then_Actions (N)) or else Present (Else_Actions (N)) then - Cnn := Make_Temporary (Loc, New_Internal_Name ('C'), N); + Cnn := Make_Temporary (Loc, 'C', N); New_If := Make_Implicit_If_Statement (N, diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index 9dd5857..a8a32fb 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -3551,9 +3551,8 @@ package body Exp_Ch7 is procedure Wrap_Transient_Expression (N : Node_Id) is Loc : constant Source_Ptr := Sloc (N); - E : constant Entity_Id := - Make_Temporary (Loc, New_Internal_Name ('E'), N); - Etyp : constant Entity_Id := Etype (N); + E : constant Entity_Id := Make_Temporary (Loc, 'E', N); + Etyp : constant Entity_Id := Etype (N); begin Insert_Actions (N, New_List ( diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index bd7f90c..b396ee5 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -4588,7 +4588,7 @@ package body Exp_Util is or else Nkind (Exp) in N_Op or else (not Name_Req and then Is_Volatile_Reference (Exp))) then - Def_Id := Make_Temporary (Loc, New_Internal_Name ('R'), Exp); + Def_Id := Make_Temporary (Loc, 'R', Exp); Set_Etype (Def_Id, Exp_Type); Res := New_Reference_To (Def_Id, Loc); @@ -4606,7 +4606,7 @@ package body Exp_Util is -- the pointer, and then do an explicit dereference on the result. elsif Nkind (Exp) = N_Explicit_Dereference then - Def_Id := Make_Temporary (Loc, New_Internal_Name ('R'), Exp); + Def_Id := Make_Temporary (Loc, 'R', Exp); Res := Make_Explicit_Dereference (Loc, New_Reference_To (Def_Id, Loc)); @@ -4650,7 +4650,7 @@ package body Exp_Util is -- Use a renaming to capture the expression, rather than create -- a controlled temporary. - Def_Id := Make_Temporary (Loc, New_Internal_Name ('R'), Exp); + Def_Id := Make_Temporary (Loc, 'R', Exp); Res := New_Reference_To (Def_Id, Loc); Insert_Action (Exp, @@ -4660,7 +4660,7 @@ package body Exp_Util is Name => Relocate_Node (Exp))); else - Def_Id := Make_Temporary (Loc, New_Internal_Name ('R'), Exp); + Def_Id := Make_Temporary (Loc, 'R', Exp); Set_Etype (Def_Id, Exp_Type); Res := New_Reference_To (Def_Id, Loc); @@ -4683,7 +4683,7 @@ package body Exp_Util is and then Nkind (Exp) /= N_Function_Call and then (Name_Req or else not Is_Volatile_Reference (Exp)) then - Def_Id := Make_Temporary (Loc, New_Internal_Name ('R'), Exp); + Def_Id := Make_Temporary (Loc, 'R', Exp); if Nkind (Exp) = N_Selected_Component and then Nkind (Prefix (Exp)) = N_Function_Call @@ -4750,8 +4750,7 @@ package body Exp_Util is and then Ada_Version >= Ada_05 then declare - Obj : constant Entity_Id := - Make_Temporary (Loc, New_Internal_Name ('F'), Exp); + Obj : constant Entity_Id := Make_Temporary (Loc, 'F', Exp); Decl : Node_Id; begin @@ -4781,7 +4780,7 @@ package body Exp_Util is E := Exp; Insert_Action (Exp, Ptr_Typ_Decl); - Def_Id := Make_Temporary (Loc, New_Internal_Name ('R'), Exp); + Def_Id := Make_Temporary (Loc, 'R', Exp); Set_Etype (Def_Id, Exp_Type); Res := diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads index ca5d7fb..d184da9 100644 --- a/gcc/ada/opt.ads +++ b/gcc/ada/opt.ads @@ -554,7 +554,7 @@ package Opt is -- GNAT -- True when switch -gnateS is used. When True, Source Coverage Obligation -- (SCO) information is generated and output in the ALI file. See unit - -- Sem_SCO for full details. + -- Par_SCO for full details. Generating_Code : Boolean := False; -- GNAT diff --git a/gcc/ada/tbuild.adb b/gcc/ada/tbuild.adb index 9049827..7273fde 100644 --- a/gcc/ada/tbuild.adb +++ b/gcc/ada/tbuild.adb @@ -442,10 +442,12 @@ package body Tbuild is function Make_Temporary (Loc : Source_Ptr; - Id : Name_Id; + Id : Character; Related_Node : Node_Id := Empty) return Node_Id is - Temp : constant Node_Id := Make_Defining_Identifier (Loc, Id); + Temp : constant Node_Id := + Make_Defining_Identifier (Loc, + Chars => New_Internal_Name (Id)); begin Set_Related_Expression (Temp, Related_Node); return Temp; diff --git a/gcc/ada/tbuild.ads b/gcc/ada/tbuild.ads index d02f7ac..261776d 100644 --- a/gcc/ada/tbuild.ads +++ b/gcc/ada/tbuild.ads @@ -177,11 +177,12 @@ package Tbuild is function Make_Temporary (Loc : Source_Ptr; - Id : Name_Id; + Id : Character; Related_Node : Node_Id := Empty) return Node_Id; -- Create a defining identifier to capture the value of an expression -- or aggregate, and link it to the expression that it replaces, in - -- order to provide better CodePeer reports. + -- order to provide better CodePeer reports. The defining identifier + -- name is obtained by Make_Internal_Name (Id). function Make_Unsuppress_Block (Loc : Source_Ptr; |