From fd8d363e257e2a8c9a22fcc276421bec68e1bb94 Mon Sep 17 00:00:00 2001 From: Steven Bosscher Date: Tue, 4 Sep 2012 13:03:02 +0000 Subject: gimple.h (gimple_build_switch): Remove. * gimple.h (gimple_build_switch): Remove. (gimple_build_switch_vec): Promote to the new gimple_build_switch. (gimple_switch_default_label): Assert the default case label is really a default case label. (gimple_switch_set_default_label): Likewise. * gimple.c (gimple_build_switch_nlabels): Make sure a default label is passed in, and simplify accordingly. (gimple_build_switch): Removed. (gimple_build_switch_vec): Rename to gimple_build_switch. * gimplify.c (gimplify_switch_expr): Update gimple_build_switch use. * gimple-pretty-print.c (dump_gimple_switch): Do not accept a NULL case label. * stmt.c (expand_case): Simplify using the fact that every GIMPLE switch must have a default case. * tree-cfg.c (group_case_labels_stmt): Likewise. (verify_gimple_switch): Use gimple_switch_label in verifier to get the label at index 0, and verify that it is a valid default case. * except.c (sjlj_emit_dispatch_table): Rewrite construction of the switch for dispatching. * tree-eh.c (lower_try_finally_switch): Update gimple_build_switch use. (lower_eh_dispatch): Likewise. * tree-vrp.c (execute_vrp): Use gimple_switch_label to get the case label at index 0 before turning it into a default case label. * omp-low.c (expand_omp_sections): Update gimple_build_switch use. * tree-switch-conversion.c (emit_case_bit_tests): Get the default case label using gimple_switch_default_label. (collect_switch_conv_info): Likewise. (process_switch): Likewise. * doc/gimple.texi: Update documentation of gimple_build_switch. From-SVN: r190925 --- gcc/tree-eh.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc/tree-eh.c') diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index 9220931..ec74d9d 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -1487,8 +1487,8 @@ lower_try_finally_switch (struct leh_state *state, struct leh_tf_state *tf) /* Build the switch statement, setting last_case to be the default label. */ - switch_stmt = gimple_build_switch_vec (finally_tmp, last_case, - case_label_vec); + switch_stmt = gimple_build_switch (finally_tmp, last_case, + case_label_vec); gimple_set_location (switch_stmt, finally_loc); /* Need to link SWITCH_STMT after running replace_goto_queue @@ -3376,7 +3376,7 @@ lower_eh_dispatch (basic_block src, gimple stmt) default_label = build_case_label (NULL, NULL, default_label); sort_case_labels (labels); - x = gimple_build_switch_vec (filter, default_label, labels); + x = gimple_build_switch (filter, default_label, labels); gsi_insert_before (&gsi, x, GSI_SAME_STMT); VEC_free (tree, heap, labels); -- cgit v1.1