diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2020-07-23 23:26:20 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-10-20 03:21:49 -0400 |
commit | b21732c521b5edd4919cf828a9716ce6f865b080 (patch) | |
tree | 845593319679078fd2e9d38445dcdd3e09a82449 /gcc/ada | |
parent | 4c5e9870f255a35bbf5848284c20ad9345f5d58b (diff) | |
download | gcc-b21732c521b5edd4919cf828a9716ce6f865b080.zip gcc-b21732c521b5edd4919cf828a9716ce6f865b080.tar.gz gcc-b21732c521b5edd4919cf828a9716ce6f865b080.tar.bz2 |
[Ada] Replace low-level Ekind membership tests with high-level Is_Formal
gcc/ada/
* einfo.adb, exp_attr.adb, sem_ch13.adb, sem_util.adb: Use
Is_Formal where possible.
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/einfo.adb | 4 | ||||
-rw-r--r-- | gcc/ada/exp_attr.adb | 2 | ||||
-rw-r--r-- | gcc/ada/sem_ch13.adb | 2 | ||||
-rw-r--r-- | gcc/ada/sem_util.adb | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb index 9ea2616..63878e4 100644 --- a/gcc/ada/einfo.adb +++ b/gcc/ada/einfo.adb @@ -2864,7 +2864,7 @@ package body Einfo is function Minimum_Accessibility (Id : E) return E is begin - pragma Assert (Ekind (Id) in Formal_Kind); + pragma Assert (Is_Formal (Id)); return Node24 (Id); end Minimum_Accessibility; @@ -6130,7 +6130,7 @@ package body Einfo is procedure Set_Minimum_Accessibility (Id : E; V : E) is begin - pragma Assert (Ekind (Id) in Formal_Kind); + pragma Assert (Is_Formal (Id)); Set_Node24 (Id, V); end Set_Minimum_Accessibility; diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb index 0bc08ae..c596659 100644 --- a/gcc/ada/exp_attr.adb +++ b/gcc/ada/exp_attr.adb @@ -2334,7 +2334,7 @@ package body Exp_Attr is and then Is_Entity_Name (Prefix (Enc_Object)) and then (Ekind (Btyp) = E_General_Access_Type or else Is_Local_Anonymous_Access (Btyp)) - and then Ekind (Entity (Prefix (Enc_Object))) in Formal_Kind + and then Is_Formal (Entity (Prefix (Enc_Object))) and then Ekind (Etype (Entity (Prefix (Enc_Object)))) = E_Anonymous_Access_Type and then Present (Extra_Accessibility diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 63ca321..ab00b59 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -7205,7 +7205,7 @@ package body Sem_Ch13 is -- check (C) - if Present (Obj) and then Ekind (Obj) in Formal_Kind then + if Present (Obj) and then Is_Formal (Obj) then Error_Msg_N ("subpool cannot be part of a parameter", Ent); return; diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 45a551f..b8bdc7b 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -9578,7 +9578,7 @@ package body Sem_Util is -- To avoid these situations where expansion may get complex we verify -- that the minimum accessibility object is within scope. - if Ekind (E) in Formal_Kind + if Is_Formal (E) and then Present (Minimum_Accessibility (E)) and then In_Open_Scopes (Scope (Minimum_Accessibility (E))) then |