aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch7.adb
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2019-12-12 11:45:24 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2020-06-02 04:58:00 -0400
commita92db2624549f119a6f5c1e19c3013768b6bad3e (patch)
tree1993d05c7b90268f5da970985d969a204eb9ecb8 /gcc/ada/sem_ch7.adb
parent86b14bb1a93d8ef01678d132013a2006a4f00deb (diff)
downloadgcc-a92db2624549f119a6f5c1e19c3013768b6bad3e.zip
gcc-a92db2624549f119a6f5c1e19c3013768b6bad3e.tar.gz
gcc-a92db2624549f119a6f5c1e19c3013768b6bad3e.tar.bz2
[Ada] Reuse Is_Package_Or_Generic_Package where possible
2020-06-02 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * contracts.adb, einfo.adb, exp_ch9.adb, sem_ch12.adb, sem_ch4.adb, sem_ch7.adb, sem_ch8.adb, sem_elab.adb, sem_type.adb, sem_util.adb: Reuse Is_Package_Or_Generic_Package where possible (similarly, reuse Is_Concurrent_Type if it was possible in the same expressions).
Diffstat (limited to 'gcc/ada/sem_ch7.adb')
-rw-r--r--gcc/ada/sem_ch7.adb6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ada/sem_ch7.adb b/gcc/ada/sem_ch7.adb
index 6d9a1db..f217dfd 100644
--- a/gcc/ada/sem_ch7.adb
+++ b/gcc/ada/sem_ch7.adb
@@ -2428,7 +2428,7 @@ package body Sem_Ch7 is
-- defined in the associated package, subject to at least one Part_Of
-- constituent.
- if Ekind_In (P, E_Generic_Package, E_Package) then
+ if Is_Package_Or_Generic_Package (P) then
declare
States : constant Elist_Id := Abstract_States (P);
State_Elmt : Elmt_Id;
@@ -3322,7 +3322,7 @@ package body Sem_Ch7 is
-- performed if the caller requests this behavior.
if Do_Abstract_States
- and then Ekind_In (Pack_Id, E_Generic_Package, E_Package)
+ and then Is_Package_Or_Generic_Package (Pack_Id)
and then Has_Non_Null_Abstract_State (Pack_Id)
and then Requires_Body
then
@@ -3380,7 +3380,7 @@ package body Sem_Ch7 is
-- provided). If Ignore_Abstract_State is True, we don't do this check
-- (so we can use Unit_Requires_Body to check for some other reason).
- elsif Ekind_In (Pack_Id, E_Generic_Package, E_Package)
+ elsif Is_Package_Or_Generic_Package (Pack_Id)
and then Present (Abstract_States (Pack_Id))
and then not Is_Null_State
(Node (First_Elmt (Abstract_States (Pack_Id))))