[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 3832b31eaadcdd3d0808ef0ea9250049d4b44dfb..b89bb8ff3f95fec2d81ac8970118aa5042a6ca36 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 9769d6849226c77061cea847c2366974cb3c3d6d..f13108092b57d7aa90d40183151178c5caaebf73 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;