+2009-08-17 Robert Dewar <dewar@adacore.com>
+
+ * make.adb: Add ??? comment
+ * tbuild.adb: Minor reformatting
+
+2009-08-17 Thomas Quinot <quinot@adacore.com>
+
+ * exp_ch4.adb (Exp_Ch4.Expand_N_Slice.Make_Temporary): Rename to
+ Make_Temporary_For_Slice to avoid confusion with Tbuild.Make_Temporary.
+ Use Tbuild.Make_Temporary to create entity for the temporary.
+
2009-08-17 Arnaud Charlet <charlet@adacore.com>
* make.adb (Process_Multilib, Scan_Make_Arg): Refine previous change
-- processing will still generate the appropriate copy in operation,
-- which will take care of the slice.
- procedure Make_Temporary;
+ procedure Make_Temporary_For_Slice;
-- Create a named variable for the value of the slice, in cases where
-- the back-end cannot handle it properly, e.g. when packed types or
-- unaligned slices are involved.
end loop;
end Is_Procedure_Actual;
- --------------------
- -- Make_Temporary --
- --------------------
+ ------------------------------
+ -- Make_Temporary_For_Slice --
+ ------------------------------
- procedure Make_Temporary is
+ procedure Make_Temporary_For_Slice is
Decl : Node_Id;
- Ent : constant Entity_Id :=
- Make_Defining_Identifier (Loc, New_Internal_Name ('T'));
+ Ent : constant Entity_Id := Make_Temporary (Loc, 'T', N);
begin
Decl :=
Make_Object_Declaration (Loc,
Rewrite (N, New_Occurrence_Of (Ent, Loc));
Analyze_And_Resolve (N, Typ);
- end Make_Temporary;
+ end Make_Temporary_For_Slice;
-- Start of processing for Expand_N_Slice
if Nkind (Parent (N)) = N_Function_Call
and then Is_Possibly_Unaligned_Slice (N)
then
- Make_Temporary;
+ Make_Temporary_For_Slice;
end if;
elsif Nkind (Parent (N)) = N_Assignment_Statement
return;
else
- Make_Temporary;
+ Make_Temporary_For_Slice;
end if;
end Expand_N_Slice;
Related_Node : Node_Id := Empty) return Node_Id
is
Temp : constant Node_Id :=
- Make_Defining_Identifier (Loc, Chars => New_Internal_Name (Id));
+ Make_Defining_Identifier (Loc,
+ Chars => New_Internal_Name (Id));
begin
Set_Related_Expression (Temp, Related_Node);
return Temp;