diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2021-01-01 13:23:35 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-05-03 05:28:28 -0400 |
commit | 3bcf8298d767a39e7f5226cc9edc6f7cae2980a7 (patch) | |
tree | c76fd231172a73d6806774cf3439aa5490f4b005 | |
parent | 02248717b775056ce6aa2e6847414c8a698145ec (diff) | |
download | gcc-3bcf8298d767a39e7f5226cc9edc6f7cae2980a7.zip gcc-3bcf8298d767a39e7f5226cc9edc6f7cae2980a7.tar.gz gcc-3bcf8298d767a39e7f5226cc9edc6f7cae2980a7.tar.bz2 |
[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.
-rw-r--r-- | gcc/ada/einfo.adb | 2 | ||||
-rw-r--r-- | gcc/ada/exp_aggr.adb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb index 9ea9373..2dd448c 100644 --- a/gcc/ada/einfo.adb +++ b/gcc/ada/einfo.adb @@ -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)); diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index 800d5f5..00ca1e8 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -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; |