[Ada] Replace low-level membership test with a high-level Is_Record_Type

gcc/ada/

	* einfo.adb (Write_Entity_Info): Simplify an Ekind membership
	test.
	* exp_aggr.adb (Is_CCG_Supported_Aggregate): Likewise.
This commit is contained in:
Piotr Trojanek 2021-01-01 13:23:35 +01:00 committed by Pierre-Marie de Rodat
parent 02248717b7
commit 3bcf8298d7
2 changed files with 2 additions and 2 deletions

View File

@ -10192,7 +10192,7 @@ package body Einfo is
Write_Eol;
when E_Component =>
if Ekind (Scope (Id)) in Record_Kind then
if Is_Record_Type (Scope (Id)) then
Write_Attribute (
" Original_Record_Component ",
Original_Record_Component (Id));

View File

@ -8623,7 +8623,7 @@ package body Exp_Aggr is
-- Aggregates are not supported for nonstandard rep clauses, since they
-- may lead to extra padding fields in CCG.
if Ekind (Etype (N)) in Record_Kind
if Is_Record_Type (Etype (N))
and then Has_Non_Standard_Rep (Etype (N))
then
return False;