aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/contracts.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/contracts.h')
-rw-r--r--gcc/cp/contracts.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/cp/contracts.h b/gcc/cp/contracts.h
index ead07d1..54eacd9 100644
--- a/gcc/cp/contracts.h
+++ b/gcc/cp/contracts.h
@@ -334,4 +334,19 @@ set_contract_semantic (tree t, contract_semantic semantic)
}
+/* Will this contract be ignored. */
+
+inline bool
+contract_ignored_p (const_tree contract)
+{
+ return (get_contract_semantic (contract) <= CCS_IGNORE);
+}
+
+/* Will this contract be evaluated? */
+
+inline bool
+contract_evaluated_p (const_tree contract)
+{
+ return (get_contract_semantic (contract) >= CCS_NEVER);
+}
#endif /* ! GCC_CP_CONTRACT_H */