From: Eric Botcazou <[email protected]>

No functional changes.

gcc/ada/ChangeLog:

        * sem_ch12.ads (Save_Global_References_In_Aspects): Move to...
        * sem_ch12.adb (Save_Global_References_In_Aspects): Move to...
        * contracts.adb (Save_Global_References_In_Contract): ...here.

Tested on x86_64-pc-linux-gnu (before the recent bootstrap breakage), committed 
on master.

---
 gcc/ada/contracts.adb | 25 +++++++++++++++++++++++++
 gcc/ada/sem_ch12.adb  | 21 ---------------------
 gcc/ada/sem_ch12.ads  |  4 ----
 3 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/gcc/ada/contracts.adb b/gcc/ada/contracts.adb
index 8aaf4112872..deea67ed366 100644
--- a/gcc/ada/contracts.adb
+++ b/gcc/ada/contracts.adb
@@ -4877,10 +4877,35 @@ package body Contracts is
      (Templ  : Node_Id;
       Gen_Id : Entity_Id)
    is
+      procedure Save_Global_References_In_Aspects (N : Node_Id);
+      --  Save all global references found in the expressions of all aspects
+      --  that appear on node N.
+
       procedure Save_Global_References_In_List (First_Prag : Node_Id);
       --  Save all global references in contract-related source pragmas found
       --  in the list, starting with pragma First_Prag.
 
+      ---------------------------------------
+      -- Save_Global_References_In_Aspects --
+      ---------------------------------------
+
+      procedure Save_Global_References_In_Aspects (N : Node_Id) is
+         Asp  : Node_Id;
+         Expr : Node_Id;
+
+      begin
+         Asp := First (Aspect_Specifications (N));
+         while Present (Asp) loop
+            Expr := Expression (Asp);
+
+            if Present (Expr) then
+               Save_Global_References (Expr);
+            end if;
+
+            Next (Asp);
+         end loop;
+      end Save_Global_References_In_Aspects;
+
       ------------------------------------
       -- Save_Global_References_In_List --
       ------------------------------------
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index e112a42e818..cbe453a7af1 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -18665,27 +18665,6 @@ package body Sem_Ch12 is
       Save_References (Templ);
    end Save_Global_References;
 
-   ---------------------------------------
-   -- Save_Global_References_In_Aspects --
-   ---------------------------------------
-
-   procedure Save_Global_References_In_Aspects (N : Node_Id) is
-      Asp  : Node_Id;
-      Expr : Node_Id;
-
-   begin
-      Asp := First (Aspect_Specifications (N));
-      while Present (Asp) loop
-         Expr := Expression (Asp);
-
-         if Present (Expr) then
-            Save_Global_References (Expr);
-         end if;
-
-         Next (Asp);
-      end loop;
-   end Save_Global_References_In_Aspects;
-
    ------------------------------------------
    -- Set_Copied_Sloc_For_Inherited_Pragma --
    ------------------------------------------
diff --git a/gcc/ada/sem_ch12.ads b/gcc/ada/sem_ch12.ads
index 83c3114667b..f8f2f024bec 100644
--- a/gcc/ada/sem_ch12.ads
+++ b/gcc/ada/sem_ch12.ads
@@ -150,10 +150,6 @@ package Sem_Ch12 is
    --  restored in stack-like fashion. Front-end inlining also uses these
    --  structures for the management of private/full views.
 
-   procedure Save_Global_References_In_Aspects (N : Node_Id);
-   --  Save all global references found within the expressions of all aspects
-   --  that appear on node N.
-
    procedure Set_Copied_Sloc_For_Inlined_Body (N : Node_Id; E : Entity_Id);
    --  This procedure is used when a subprogram body is inlined. This process
    --  shares the same circuitry as the creation of an instantiated copy of
-- 
2.51.0

Reply via email to