pp_c_ws_string (this, "__builtin_memcpy");
pp_c_left_paren (this);
pp_ampersand (this);
- primary_expression (TREE_OPERAND (e, 0));
+ primary_expression (TARGET_EXPR_SLOT (e));
pp_separate_with (this, ',');
pp_ampersand (this);
- initializer (TREE_OPERAND (e, 1));
- if (TREE_OPERAND (e, 2))
+ initializer (TARGET_EXPR_INITIAL (e));
+ if (TARGET_EXPR_CLEANUP (e))
{
pp_separate_with (this, ',');
- expression (TREE_OPERAND (e, 2));
+ expression (TARGET_EXPR_CLEANUP (e));
}
pp_c_right_paren (this);
break;
break;
case TARGET_EXPR:
- postfix_expression (TREE_OPERAND (e, 1));
+ postfix_expression (TARGET_EXPR_INITIAL (e));
break;
case BIND_EXPR:
if (TREE_CODE (awrs_call) == TARGET_EXPR)
{
te = awrs_call;
- awrs_call = TREE_OPERAND (awrs_call, 1);
+ awrs_call = TARGET_EXPR_INITIAL (awrs_call);
}
TREE_VEC_ELT (awaiter_calls, 2) = awrs_call; /* await_resume(). */
its contained await. Otherwise, just build the CO_YIELD_EXPR. */
if (TREE_CODE (op) == TARGET_EXPR)
{
- tree t = TREE_OPERAND (op, 1);
+ tree t = TARGET_EXPR_INITIAL (op);
t = build2_loc (kw, CO_YIELD_EXPR, TREE_TYPE (t), expr, t);
- TREE_OPERAND (op, 1) = t;
+ TARGET_EXPR_INITIAL (op) = t;
}
else
op = build2_loc (kw, CO_YIELD_EXPR, TREE_TYPE (op), expr, op);
tree v = TREE_OPERAND (aw_expr, 3);
tree o = TREE_VEC_ELT (v, 1);
if (TREE_CODE (o) == TARGET_EXPR)
- TREE_VEC_ELT (v, 1) = get_target_expr (TREE_OPERAND (o, 1));
+ TREE_VEC_ELT (v, 1) = get_target_expr (TARGET_EXPR_INITIAL (o));
return NULL_TREE;
}
{
if (TREE_CODE (t) != TARGET_EXPR)
return false;
- tree v = TREE_OPERAND (t, 0);
+ tree v = TARGET_EXPR_SLOT (t);
if (!DECL_ARTIFICIAL (v))
return false;
if (DECL_NAME (v))
{
temps_used->add (inner);
gcc_checking_assert
- (TREE_CODE (TREE_OPERAND (inner, 1)) != COND_EXPR);
+ (TREE_CODE (TARGET_EXPR_INITIAL (inner)) != COND_EXPR);
}
}
break;
free (buf);
bool already_present = promoted->add (var);
gcc_checking_assert (!already_present);
- tree inner = TREE_OPERAND (init, 1);
+ tree inner = TARGET_EXPR_INITIAL (init);
gcc_checking_assert (TREE_CODE (inner) != COND_EXPR);
init = cp_build_modify_expr (input_location, var, INIT_EXPR, init,
tf_warning_or_error);
if (t == n->init && n->var == NULL_TREE)
{
n->var = var;
- proxy_replace pr = {TREE_OPERAND (t, 0), var};
+ proxy_replace pr = {TARGET_EXPR_SLOT (t), var};
cp_walk_tree (&init, replace_proxy, &pr, NULL);
n->init = init;
if (replace_in)
/* We have to replace the target expr... */
*v.entry = var;
/* ... and any uses of its var. */
- proxy_replace pr = {TREE_OPERAND (t, 0), var};
+ proxy_replace pr = {TARGET_EXPR_SLOT (t), var};
cp_walk_tree (&n->init, replace_proxy, &pr, NULL);
/* Compiler-generated temporaries can also have uses in
following arms of compound expressions, which will be listed
it initializes anything other that the parameter slot for the
default argument. Note we may have cleared out the first
operand in expand_expr, so don't go killing ourselves. */
- if (TREE_OPERAND (t, 1))
- dump_expr (pp, TREE_OPERAND (t, 1), flags | TFF_EXPR_IN_PARENS);
+ if (TARGET_EXPR_INITIAL (t))
+ dump_expr (pp, TARGET_EXPR_INITIAL (t), flags | TFF_EXPR_IN_PARENS);
break;
case POINTER_PLUS_EXPR:
{
tree lobj = *i;
if (TREE_CODE (lobj) == TARGET_EXPR)
- lobj = TREE_OPERAND (lobj, 0);
+ lobj = TARGET_EXPR_SLOT (lobj);
tree lt = TREE_TYPE (lobj);
gcc_assert (LAMBDA_TYPE_P (lt) && CLASS_TYPE_P (lt));
{
tree u;
- if (TREE_CODE (TREE_OPERAND (t, 1)) == AGGR_INIT_EXPR)
+ if (TREE_CODE (TARGET_EXPR_INITIAL (t)) == AGGR_INIT_EXPR)
{
- u = build_cplus_new (TREE_TYPE (t), TREE_OPERAND (t, 1),
+ u = build_cplus_new (TREE_TYPE (t), TARGET_EXPR_INITIAL (t),
tf_warning_or_error);
if (u == error_mark_node)
return u;
- if (AGGR_INIT_ZERO_FIRST (TREE_OPERAND (t, 1)))
- AGGR_INIT_ZERO_FIRST (TREE_OPERAND (u, 1)) = true;
+ if (AGGR_INIT_ZERO_FIRST (TARGET_EXPR_INITIAL (t)))
+ AGGR_INIT_ZERO_FIRST (TARGET_EXPR_INITIAL (u)) = true;
}
else
- u = force_target_expr (TREE_TYPE (t), TREE_OPERAND (t, 1),
+ u = force_target_expr (TREE_TYPE (t), TARGET_EXPR_INITIAL (t),
tf_warning_or_error);
TARGET_EXPR_IMPLICIT_P (u) = TARGET_EXPR_IMPLICIT_P (t);
/* Map the old variable to the new one. */
splay_tree_insert (target_remap,
- (splay_tree_key) TREE_OPERAND (t, 0),
- (splay_tree_value) TREE_OPERAND (u, 0));
+ (splay_tree_key) TARGET_EXPR_SLOT (t),
+ (splay_tree_value) TARGET_EXPR_SLOT (u));
- TREE_OPERAND (u, 1) = break_out_target_exprs (TREE_OPERAND (u, 1),
- data.clear_location);
- if (TREE_OPERAND (u, 1) == error_mark_node)
+ TARGET_EXPR_INITIAL (u) = break_out_target_exprs (TARGET_EXPR_INITIAL (u),
+ data.clear_location);
+ if (TARGET_EXPR_INITIAL (u) == error_mark_node)
return error_mark_node;
if (data.clear_location)
case TARGET_EXPR:
{
- tree o1 = TREE_OPERAND (t1, 0);
- tree o2 = TREE_OPERAND (t2, 0);
+ tree o1 = TARGET_EXPR_SLOT (t1);
+ tree o2 = TARGET_EXPR_SLOT (t2);
/* Special case: if either target is an unallocated VAR_DECL,
it means that it's going to be unified with whatever the
else if (!cp_tree_equal (o1, o2))
return false;
- return cp_tree_equal (TREE_OPERAND (t1, 1), TREE_OPERAND (t2, 1));
+ return cp_tree_equal (TARGET_EXPR_INITIAL (t1),
+ TARGET_EXPR_INITIAL (t2));
}
case PARM_DECL:
case TARGET_EXPR:
TREE_ADDRESSABLE (x) = 1;
- cxx_mark_addressable (TREE_OPERAND (x, 0));
+ cxx_mark_addressable (TARGET_EXPR_SLOT (x));
return true;
default:
/* If the rhs is a TARGET_EXPR, then build the compound
expression inside the target_expr's initializer. This
helps the compiler to eliminate unnecessary temporaries. */
- tree init = TREE_OPERAND (rhs, 1);
+ tree init = TARGET_EXPR_INITIAL (rhs);
init = build2 (COMPOUND_EXPR, TREE_TYPE (init), lhs, init);
- TREE_OPERAND (rhs, 1) = init;
+ TARGET_EXPR_INITIAL (rhs) = init;
if (eptype)
rhs = build1 (EXCESS_PRECISION_EXPR, eptype, rhs);
expanded without a target. */
if (TREE_CODE (newrhs) == TARGET_EXPR)
newrhs = build2 (COMPOUND_EXPR, TREE_TYPE (newrhs), newrhs,
- TREE_OPERAND (newrhs, 0));
+ TARGET_EXPR_SLOT (newrhs));
}
if (newrhs == error_mark_node)
/* We can't initialize a register from a AGGR_INIT_EXPR. */
else if (! cfun->returns_struct
&& TREE_CODE (retval) == TARGET_EXPR
- && TREE_CODE (TREE_OPERAND (retval, 1)) == AGGR_INIT_EXPR)
+ && TREE_CODE (TARGET_EXPR_INITIAL (retval)) == AGGR_INIT_EXPR)
retval = build2 (COMPOUND_EXPR, TREE_TYPE (retval), retval,
- TREE_OPERAND (retval, 0));
+ TARGET_EXPR_SLOT (retval));
else if (!processing_template_decl
&& maybe_warn_about_returning_address_of_local (retval, loc)
&& INDIRECT_TYPE_P (valtype))