summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch8.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_ch8.ads')
-rw-r--r--gcc/ada/sem_ch8.ads26
1 files changed, 17 insertions, 9 deletions
diff --git a/gcc/ada/sem_ch8.ads b/gcc/ada/sem_ch8.ads
index 195c03bd3a9..99d2b1485d4 100644
--- a/gcc/ada/sem_ch8.ads
+++ b/gcc/ada/sem_ch8.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -148,18 +148,26 @@ package Sem_Ch8 is
-- with-clause on system. N is absent when the function is called to find
-- the visibility of implicit operators.
- procedure Restore_Scope_Stack (Handle_Use : Boolean := True);
- procedure Save_Scope_Stack (Handle_Use : Boolean := True);
- -- These two procedures are called from Semantics, when a unit U1 is to
+ function Save_Scope_Stack
+ (Handle_Use : Boolean := True) return Elist_Id;
+ procedure Restore_Scope_Stack
+ (List : Elist_Id;
+ Handle_Use : Boolean := True);
+ -- These two subprograms are called from Semantics, when a unit U1 is to
-- be compiled in the course of the compilation of another unit U2. This
-- happens whenever Rtsfind is called. U1, the unit retrieved by Rtsfind,
-- must be compiled in its own context, and the current scope stack
- -- containing U2 and local scopes must be made unreachable. On return, the
- -- contents of the scope stack must be made accessible again. The flag
- -- Handle_Use indicates whether local use clauses must be removed or
- -- installed. In the case of inlining of instance bodies, the visibility
+ -- containing U2 and local scopes must be made unreachable. This is
+ -- achieved using a call to Save_Scope_Stack. On return, the contents
+ -- of the scope stack must be made accessible again with a call to
+ -- Restore_Scope_Stack.
+ --
+ -- The flag Handle_Use indicates whether local use clauses must be removed
+ -- or installed. In the case of inlining of instance bodies, the visibility
-- handling is done fully in Inline_Instance_Body, and use clauses are
- -- handled there.
+ -- handled there. Save_Scope_Stack returns the list of entities which have
+ -- been temporarily removed from visibility; that list must be passed to
+ -- Restore_Scope_Stack to restore their visibility.
procedure Set_Use (L : List_Id);
-- Find use clauses that are declarative items in a package declaration