@@ -3204,12 +3204,6 @@ struct GTY(()) lang_decl {
3204
3204
#define CONTRACT_HELPER (NODE ) \
3205
3205
(LANG_DECL_FN_CHECK (NODE)->contract_helper )
3206
3206
3207
- /* In VIEW_CONVERT_EXPR, set when this node is a const wrapper. Used to
3208
- constify entities inside contract assertions. */
3209
-
3210
- #define CONTRACT_CONSTIFY_EXPR_P (NODE ) \
3211
- (TREE_CHECK (NODE, VIEW_CONVERT_EXPR)->base .private_flag )
3212
-
3213
3207
/* For a FUNCTION_DECL or a VAR_DECL, the language linkage for the
3214
3208
declaration. Some entities (like a member function in a local
3215
3209
class, or a local variable) do not have linkage at all, and this
@@ -9012,19 +9006,17 @@ set_contract_const (tree t, bool constify)
9012
9006
inline bool
9013
9007
contract_const_wrapper_p (const_tree exp)
9014
9008
{
9015
- /* A wrapper node has code VIEW_CONVERT_EXPR, and the flag
9016
- EXPR_LOCATION_WRAPPER_P is set. */
9017
- if (TREE_CODE (exp) == VIEW_CONVERT_EXPR
9018
- && CONTRACT_CONSTIFY_EXPR_P (exp))
9019
- return true ;
9020
- return false ;
9009
+ /* A wrapper node has code VIEW_CONVERT_EXPR, and the flag base.private_flag
9010
+ is set. The wrapper node is used to Used to constify entities inside
9011
+ contract assertions. */
9012
+ return ((TREE_CODE (exp) == VIEW_CONVERT_EXPR) && exp->base .private_flag );
9021
9013
}
9022
9014
9023
- /* If EXP is a CONTRACT_CONSTIFY_EXPR_P , return the wrapped expression.
9015
+ /* If EXP is a contract_const_wrapper_p , return the wrapped expression.
9024
9016
Otherwise, do nothing. */
9025
9017
9026
9018
inline tree
9027
- strip_contract_constify_expr (tree exp)
9019
+ strip_contract_const_wrapper (tree exp)
9028
9020
{
9029
9021
if (contract_const_wrapper_p (exp))
9030
9022
return TREE_OPERAND (exp, 0 );
0 commit comments