summaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r--gcc/stmt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index b84fa670e70..700dbb508ce 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -2224,12 +2224,12 @@ expand_case (gimple stmt)
void
expand_sjlj_dispatch_table (rtx dispatch_index,
- VEC(tree,heap) *dispatch_table)
+ vec<tree> dispatch_table)
{
tree index_type = integer_type_node;
enum machine_mode index_mode = TYPE_MODE (index_type);
- int ncases = VEC_length (tree, dispatch_table);
+ int ncases = dispatch_table.length ();
do_pending_stack_adjust ();
rtx before_case = get_last_insn ();
@@ -2239,7 +2239,7 @@ expand_sjlj_dispatch_table (rtx dispatch_index,
and seems to be a reasonable compromise between the "old way"
of expanding as a decision tree or dispatch table vs. the "new
way" with decrement chain or dispatch table. */
- if (VEC_length (tree, dispatch_table) <= 5
+ if (dispatch_table.length () <= 5
|| (!HAVE_casesi && !HAVE_tablejump)
|| !flag_jump_tables)
{
@@ -2261,7 +2261,7 @@ expand_sjlj_dispatch_table (rtx dispatch_index,
rtx zero = CONST0_RTX (index_mode);
for (int i = 0; i < ncases; i++)
{
- tree elt = VEC_index (tree, dispatch_table, i);
+ tree elt = dispatch_table[i];
rtx lab = label_rtx (CASE_LABEL (elt));
do_jump_if_equal (index_mode, index, zero, lab, 0, -1);
force_expand_binop (index_mode, sub_optab,
@@ -2278,13 +2278,13 @@ expand_sjlj_dispatch_table (rtx dispatch_index,
ncases);
tree index_expr = make_tree (index_type, dispatch_index);
tree minval = build_int_cst (index_type, 0);
- tree maxval = CASE_LOW (VEC_last (tree, dispatch_table));
+ tree maxval = CASE_LOW (dispatch_table.last ());
tree range = maxval;
rtx default_label = gen_label_rtx ();
for (int i = ncases - 1; i > 0; --i)
{
- tree elt = VEC_index (tree, dispatch_table, i);
+ tree elt = dispatch_table[i];
tree low = CASE_LOW (elt);
tree lab = CASE_LABEL (elt);
case_list = add_case_node (case_list, low, low, lab, 0, case_node_pool);