aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-gimplify.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/cp-gimplify.c')
-rw-r--r--gcc/cp/cp-gimplify.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c
index f715e96..cde480d 100644
--- a/gcc/cp/cp-gimplify.c
+++ b/gcc/cp/cp-gimplify.c
@@ -824,7 +824,7 @@ omp_cxx_notice_variable (struct cp_genericize_omp_taskreg *omp_ctx, tree decl)
struct cp_genericize_data
{
struct pointer_set_t *p_set;
- VEC (tree, heap) *bind_expr_stack;
+ vec<tree> bind_expr_stack;
struct cp_genericize_omp_taskreg *omp_ctx;
};
@@ -1015,10 +1015,10 @@ cp_genericize_r (tree *stmt_p, int *walk_subtrees, void *data)
: OMP_CLAUSE_DEFAULT_PRIVATE);
}
}
- VEC_safe_push (tree, heap, wtd->bind_expr_stack, stmt);
+ wtd->bind_expr_stack.safe_push (stmt);
cp_walk_tree (&BIND_EXPR_BODY (stmt),
cp_genericize_r, data, NULL);
- VEC_pop (tree, wtd->bind_expr_stack);
+ wtd->bind_expr_stack.pop ();
}
else if (TREE_CODE (stmt) == USING_STMT)
@@ -1028,12 +1028,11 @@ cp_genericize_r (tree *stmt_p, int *walk_subtrees, void *data)
/* Get the innermost inclosing GIMPLE_BIND that has a non NULL
BLOCK, and append an IMPORTED_DECL to its
BLOCK_VARS chained list. */
- if (wtd->bind_expr_stack)
+ if (wtd->bind_expr_stack.exists ())
{
int i;
- for (i = VEC_length (tree, wtd->bind_expr_stack) - 1; i >= 0; i--)
- if ((block = BIND_EXPR_BLOCK (VEC_index (tree,
- wtd->bind_expr_stack, i))))
+ for (i = wtd->bind_expr_stack.length () - 1; i >= 0; i--)
+ if ((block = BIND_EXPR_BLOCK (wtd->bind_expr_stack[i])))
break;
}
if (block)
@@ -1151,11 +1150,11 @@ cp_genericize_tree (tree* t_p)
struct cp_genericize_data wtd;
wtd.p_set = pointer_set_create ();
- wtd.bind_expr_stack = NULL;
+ wtd.bind_expr_stack.create (0);
wtd.omp_ctx = NULL;
cp_walk_tree (t_p, cp_genericize_r, &wtd, NULL);
pointer_set_destroy (wtd.p_set);
- VEC_free (tree, heap, wtd.bind_expr_stack);
+ wtd.bind_expr_stack.release ();
}
void