]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Sem_Utils: make Has_Prefix public
authorJavier Miranda <miranda@adacore.com>
Mon, 16 Jul 2018 14:10:03 +0000 (14:10 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 16 Jul 2018 14:10:03 +0000 (14:10 +0000)
2018-07-16  Javier Miranda  <miranda@adacore.com>

gcc/ada/

* sem_util.ads, sem_util.adb (Has_Prefix): Move this function to the
public part of this package.

From-SVN: r262702

gcc/ada/ChangeLog
gcc/ada/sem_util.adb
gcc/ada/sem_util.ads

index 9b66735a5070537346a2077bf8573bd2e4bb599b..bcf226282c102dddde97d8873e81b2a7390f1a26 100644 (file)
@@ -1,3 +1,8 @@
+2018-07-16  Javier Miranda  <miranda@adacore.com>
+
+       * sem_util.ads, sem_util.adb (Has_Prefix): Move this function to the
+       public part of this package.
+
 2018-07-16  Yannick Moy  <moy@adacore.com>
 
        * sem_res.adb (Resolve_Call): Do not inline calls inside
index 70c02da6ea1b39c067f25e82bd10e4211b3ec16c..59687f5c110da3eb35408182f62904b891a794cf 100644 (file)
@@ -5989,9 +5989,6 @@ package body Sem_Util is
       Obj1 : Node_Id := A1;
       Obj2 : Node_Id := A2;
 
-      function Has_Prefix (N : Node_Id) return Boolean;
-      --  Return True if N has attribute Prefix
-
       function Is_Renaming (N : Node_Id) return Boolean;
       --  Return true if N names a renaming entity
 
@@ -6001,23 +5998,6 @@ package body Sem_Util is
       --  renamed object_name contains references to variables or calls on
       --  nonstatic functions; otherwise return True (RM 6.4.1(6.10/3))
 
-      ----------------
-      -- Has_Prefix --
-      ----------------
-
-      function Has_Prefix (N : Node_Id) return Boolean is
-      begin
-         return
-           Nkind_In (N,
-             N_Attribute_Reference,
-             N_Expanded_Name,
-             N_Explicit_Dereference,
-             N_Indexed_Component,
-             N_Reference,
-             N_Selected_Component,
-             N_Slice);
-      end Has_Prefix;
-
       -----------------
       -- Is_Renaming --
       -----------------
@@ -11548,6 +11528,23 @@ package body Sem_Util is
       return Has_PE;
    end Has_Preelaborable_Initialization;
 
+   ----------------
+   -- Has_Prefix --
+   ----------------
+
+   function Has_Prefix (N : Node_Id) return Boolean is
+   begin
+      return
+        Nkind_In (N,
+          N_Attribute_Reference,
+          N_Expanded_Name,
+          N_Explicit_Dereference,
+          N_Indexed_Component,
+          N_Reference,
+          N_Selected_Component,
+          N_Slice);
+   end Has_Prefix;
+
    ---------------------------
    -- Has_Private_Component --
    ---------------------------
index a0b95fa1cbcc6bdf92dfc22f62d418b15e9ba14d..9bff3ba92cf34c4eae2e81dd551f4a993b6d5765 100644 (file)
@@ -1313,6 +1313,9 @@ package Sem_Util is
    --  Return True iff type E has preelaborable initialization as defined in
    --  Ada 2005 (see AI-161 for details of the definition of this attribute).
 
+   function Has_Prefix (N : Node_Id) return Boolean;
+   --  Return True if N has attribute Prefix
+
    function Has_Private_Component (Type_Id : Entity_Id) return Boolean;
    --  Check if a type has a (sub)component of a private type that has not
    --  yet received a full declaration.