===================================================================
@@ -1145,10 +1145,7 @@ package body Freeze is
if Nkind_In (Par, N_Object_Declaration, N_Assignment_Statement)
and then Comes_From_Source (Par)
then
- Temp :=
- Make_Defining_Identifier (Loc,
- New_Internal_Name ('T'));
-
+ Temp := Make_Temporary (Loc, 'T', E);
New_N :=
Make_Object_Declaration (Loc,
Defining_Identifier => Temp,
@@ -5419,8 +5416,7 @@ package body Freeze is
-- involve secondary stack expansion.
else
- Dnam :=
- Make_Defining_Identifier (Loc, New_Internal_Name ('D'));
+ Dnam := Make_Temporary (Loc, 'D');
Dbody :=
Make_Subprogram_Body (Loc,
===================================================================
@@ -3119,11 +3119,7 @@ package body Layout is
Make_Func : Boolean := False) return Dynamic_SO_Ref
is
Loc : constant Source_Ptr := Sloc (Ins_Type);
-
- K : constant Entity_Id :=
- Make_Defining_Identifier (Loc,
- Chars => New_Internal_Name ('K'));
-
+ K : constant Entity_Id := Make_Temporary (Loc, 'K');
Decl : Node_Id;
Vtype_Primary_View : Entity_Id;
===================================================================
@@ -2107,9 +2107,7 @@ package body Exp_Util is
begin
-- Only consider record types
- if Ekind (Typ) /= E_Record_Type
- and then Ekind (Typ) /= E_Record_Subtype
- then
+ if not Ekind_In (Typ, E_Record_Type, E_Record_Subtype) then
return False;
end if;
@@ -4406,9 +4404,7 @@ package body Exp_Util is
-- already rewritten a variable node with a constant as
-- a result of an earlier Force_Evaluation call.
- if Ekind (Entity (N)) = E_Constant
- or else Ekind (Entity (N)) = E_In_Parameter
- then
+ if Ekind_In (Entity (N), E_Constant, E_In_Parameter) then
return True;
-- Functions are not side effect free
===================================================================
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
+-- Copyright (C) 1998-2010, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -270,10 +270,7 @@ package body Exp_Smem is
return False;
else
- if Ekind (Formal) = E_Out_Parameter
- or else
- Ekind (Formal) = E_In_Out_Parameter
- then
+ if Ekind_In (Formal, E_Out_Parameter, E_In_Out_Parameter) then
Insert_Node := Call;
return True;
else
===================================================================
@@ -2941,9 +2941,8 @@ package body Exp_Ch6 is
return;
end if;
- if Ekind (Subp) = E_Function
- or else Ekind (Subp) = E_Procedure
- then
+ if Ekind_In (Subp, E_Function, E_Procedure) then
+
-- We perform two simple optimization on calls:
-- a) replace calls to null procedures unconditionally;
@@ -4338,9 +4337,7 @@ package body Exp_Ch6 is
-- For a procedure, we add a return for all possible syntactic ends of
-- the subprogram.
- if Ekind (Spec_Id) = E_Procedure
- or else Ekind (Spec_Id) = E_Generic_Procedure
- then
+ if Ekind_In (Spec_Id, E_Procedure, E_Generic_Procedure) then
Add_Return (Statements (H));
if Present (Exception_Handlers (H)) then
@@ -4707,8 +4704,7 @@ package body Exp_Ch6 is
-- foreign convention or whose result type has a foreign convention
-- never qualify.
- if Ekind (E) = E_Function
- or else Ekind (E) = E_Generic_Function
+ if Ekind_In (E, E_Function, E_Generic_Function)
or else (Ekind (E) = E_Subprogram_Type
and then Etype (E) /= Standard_Void_Type)
then
===================================================================
@@ -6221,9 +6221,7 @@ package body Exp_Ch3 is
-- See GNAT Pool packages in the Run-Time for more details
- elsif Ekind (Def_Id) = E_Access_Type
- or else Ekind (Def_Id) = E_General_Access_Type
- then
+ elsif Ekind_In (Def_Id, E_Access_Type, E_General_Access_Type) then
declare
Loc : constant Source_Ptr := Sloc (N);
Desig_Type : constant Entity_Id := Designated_Type (Def_Id);