[Ada] Reuse Is_Object where possible

2020-06-16  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* einfo.adb, exp_spark.adb, exp_util.adb, sem_eval.adb: Replace
	"Ekind ... in Object_Kind" with "Is_Object (...)".
This commit is contained in:
Piotr Trojanek 2020-04-03 17:23:03 +02:00 committed by Pierre-Marie de Rodat
parent 96bd3460c9
commit a1447c2a84
4 changed files with 4 additions and 4 deletions

View File

@ -997,7 +997,7 @@ package body Einfo is
function Current_Value (Id : E) return N is
begin
pragma Assert (Ekind (Id) in Object_Kind);
pragma Assert (Is_Object (Id));
return Node9 (Id);
end Current_Value;

View File

@ -434,7 +434,7 @@ package body Exp_SPARK is
begin
-- Replace a reference to a renaming with the actual renamed object
if Ekind (Obj_Id) in Object_Kind then
if Is_Object (Obj_Id) then
Ren := Renamed_Object (Obj_Id);
if Present (Ren) then

View File

@ -6396,7 +6396,7 @@ package body Exp_Util is
-- Immediate return, nothing doing, if this is not an object
if Ekind (Ent) not in Object_Kind then
if not Is_Object (Ent) then
return;
end if;

View File

@ -1001,7 +1001,7 @@ package body Sem_Eval is
(Is_Known_Valid (Entity (Opnd))
or else Ekind (Entity (Opnd)) = E_In_Parameter
or else
(Ekind (Entity (Opnd)) in Object_Kind
(Is_Object (Entity (Opnd))
and then Present (Current_Value (Entity (Opnd))))))
or else Is_OK_Static_Expression (Opnd);
end Is_Known_Valid_Operand;