aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/ghost.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/ghost.adb')
-rw-r--r--gcc/ada/ghost.adb10
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/ada/ghost.adb b/gcc/ada/ghost.adb
index 1ce1d6a..0f03285 100644
--- a/gcc/ada/ghost.adb
+++ b/gcc/ada/ghost.adb
@@ -271,11 +271,11 @@ package body Ghost is
if Present (Subp_Id) then
- -- The context is the internally built _Postconditions
+ -- The context is the internally built _Wrapped_Statements
-- procedure, which is OK because the real check was done
- -- before expansion activities.
+ -- before contract expansion activities.
- if Chars (Subp_Id) = Name_uPostconditions then
+ if Chars (Subp_Id) = Name_uWrapped_Statements then
return True;
-- The context is the internally built predicate function,
@@ -432,9 +432,7 @@ package body Ghost is
-- but it may still contain references to Ghost entities.
elsif Nkind (Stmt) = N_If_Statement
- and then Nkind (Original_Node (Stmt)) = N_Pragma
- and then Assertion_Expression_Pragma
- (Get_Pragma_Id (Original_Node (Stmt)))
+ and then Comes_From_Check_Or_Contract (Stmt)
then
return True;
end if;