aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sinfo.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-06-14 14:11:48 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-06-14 14:11:48 +0200
commit34639e68704cbaa4a66c710f9dd6ff830925e38b (patch)
tree3f390a5f217a22e1d7ce5ad0029abc7b53481d40 /gcc/ada/sinfo.adb
parent165d9b9da492ae59ef3578b64284c86f03b1bd48 (diff)
downloadgcc-34639e68704cbaa4a66c710f9dd6ff830925e38b.zip
gcc-34639e68704cbaa4a66c710f9dd6ff830925e38b.tar.gz
gcc-34639e68704cbaa4a66c710f9dd6ff830925e38b.tar.bz2
[multiple changes]
2010-06-14 Ed Schonberg <schonberg@adacore.com> * sinfo.ads, sinfo,adb (Withed_Body): New attribute of a with_clause. Indicates that there is an instantiation in the current unit that loaded the body of the unit denoted by the with_clause. * sem_ch12.adb (Mark_Context): When instanting a generic body, check whether a with_clause in the current context denotes the unit that holds the generic declaration, and mark the with_clause accordingly. (Instantiate_Package_Body): call Mark_Context. * sem.adb (Process_Bodies_In_Context): Use Withed_Body to determine whether a given body should be traversed before the spec of the main unit. 2010-06-14 Ed Falis <falis@adacore.com> * sysdep.c: Fix 653 build against vThreads headers From-SVN: r160725
Diffstat (limited to 'gcc/ada/sinfo.adb')
-rw-r--r--gcc/ada/sinfo.adb16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/ada/sinfo.adb b/gcc/ada/sinfo.adb
index 73377f1..5a431cd 100644
--- a/gcc/ada/sinfo.adb
+++ b/gcc/ada/sinfo.adb
@@ -2931,6 +2931,14 @@ package body Sinfo is
return Flag13 (N);
end Was_Originally_Stub;
+ function Withed_Body
+ (N : Node_Id) return Node_Id is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_With_Clause);
+ return Node1 (N);
+ end Withed_Body;
+
function Zero_Cost_Handling
(N : Node_Id) return Boolean is
begin
@@ -5809,6 +5817,14 @@ package body Sinfo is
Set_Flag13 (N, Val);
end Set_Was_Originally_Stub;
+ procedure Set_Withed_Body
+ (N : Node_Id; Val : Node_Id) is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_With_Clause);
+ Set_Node1 (N, Val);
+ end Set_Withed_Body;
+
procedure Set_Zero_Cost_Handling
(N : Node_Id; Val : Boolean := True) is
begin