[Ada] Exp_Util: minor refactoring
authorPiotr Trojanek <trojanek@adacore.com>
Tue, 9 Jul 2019 07:54:55 +0000 (07:54 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 9 Jul 2019 07:54:55 +0000 (07:54 +0000)
2019-07-09  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

* exp_util.adb (Containing_Package_With_Ext_Axioms): Replace
low-level Ekind test with a high-level wrapper.

From-SVN: r273285

gcc/ada/ChangeLog
gcc/ada/exp_util.adb

index 3832b31..b89bb8f 100644 (file)
@@ -1,3 +1,8 @@
+2019-07-09  Piotr Trojanek  <trojanek@adacore.com>
+
+       * exp_util.adb (Containing_Package_With_Ext_Axioms): Replace
+       low-level Ekind test with a high-level wrapper.
+
 2019-07-09  Arnaud Charlet  <charlet@adacore.com>
 
        * libgnat/s-memory.adb: Disable calls to Abort defer/undefer
index 9769d68..f131080 100644 (file)
@@ -4492,7 +4492,7 @@ package body Exp_Util is
    begin
       --  E is the package or generic package which is externally axiomatized
 
-      if Ekind_In (E, E_Generic_Package, E_Package)
+      if Is_Package_Or_Generic_Package (E)
         and then Has_Annotate_Pragma_For_External_Axiomatization (E)
       then
          return E;