Commit 124e3829 by Robert Dewar Committed by Arnaud Charlet

exp_aggr.adb, [...]: Minor reformatting Minor code reorganization

2009-07-15  Robert Dewar  <dewar@adacore.com>

	* exp_aggr.adb, tbuild.ads, tbuild.adb: Minor reformatting
	Minor code reorganization

From-SVN: r149665
parent c9b2f286
2009-07-15 Robert Dewar <dewar@adacore.com>
* exp_aggr.adb, tbuild.ads, tbuild.adb: Minor reformatting
Minor code reorganization
2009-07-14 Taras Glek <tglek@mozilla.com> 2009-07-14 Taras Glek <tglek@mozilla.com>
Rafael Espindola <espindola@google.com> Rafael Espindola <espindola@google.com>
......
...@@ -2976,21 +2976,22 @@ package body Exp_Aggr is ...@@ -2976,21 +2976,22 @@ package body Exp_Aggr is
declare declare
SubE : constant Entity_Id := SubE : constant Entity_Id :=
Make_Defining_Identifier (Loc, Make_Defining_Identifier (Loc,
New_Internal_Name ('T')); Chars => New_Internal_Name ('T'));
SubD : constant Node_Id := SubD : constant Node_Id :=
Make_Subtype_Declaration (Loc, Make_Subtype_Declaration (Loc,
Defining_Identifier => Defining_Identifier => SubE,
SubE,
Subtype_Indication => Subtype_Indication =>
Make_Subtype_Indication (Loc, Make_Subtype_Indication (Loc,
Subtype_Mark => New_Reference_To ( Subtype_Mark =>
Etype (Comp_Type), Loc), New_Reference_To
(Etype (Comp_Type), Loc),
Constraint => Constraint =>
Make_Index_Or_Discriminant_Constraint ( Make_Index_Or_Discriminant_Constraint
Loc, Constraints => New_List ( (Loc,
New_Copy_Tree (Aggregate_Bounds ( Constraints => New_List (
Expr_Q)))))); New_Copy_Tree
(Aggregate_Bounds (Expr_Q))))));
-- Create a temporary array of the above subtype which -- Create a temporary array of the above subtype which
-- will be used to capture the aggregate assignments. -- will be used to capture the aggregate assignments.
......
...@@ -436,14 +436,17 @@ package body Tbuild is ...@@ -436,14 +436,17 @@ package body Tbuild is
Strval => End_String); Strval => End_String);
end Make_String_Literal; end Make_String_Literal;
--------------------
-- Make_Temporary --
--------------------
function Make_Temporary function Make_Temporary
(Loc : Source_Ptr; (Loc : Source_Ptr;
Id : Name_Id; Id : Name_Id;
Related_Node : Node_Id := Empty) return Node_Id Related_Node : Node_Id := Empty) return Node_Id
is is
Temp : Node_Id; Temp : constant Node_Id := Make_Defining_Identifier (Loc, Id);
begin begin
Temp := Make_Defining_Identifier (Loc, Id);
Set_Related_Expression (Temp, Related_Node); Set_Related_Expression (Temp, Related_Node);
return Temp; return Temp;
end Make_Temporary; end Make_Temporary;
......
...@@ -176,8 +176,8 @@ package Tbuild is ...@@ -176,8 +176,8 @@ package Tbuild is
-- is given as a normal string instead of a String_Id value. -- is given as a normal string instead of a String_Id value.
function Make_Temporary function Make_Temporary
(Loc : Source_Ptr; (Loc : Source_Ptr;
Id : Name_Id; Id : Name_Id;
Related_Node : Node_Id := Empty) return Node_Id; Related_Node : Node_Id := Empty) return Node_Id;
-- Create a defining identifier to capture the value of an expression -- Create a defining identifier to capture the value of an expression
-- or aggregate, and link it to the expression that it replaces, in -- or aggregate, and link it to the expression that it replaces, in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment