summaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-06 03:47:57 +0000
committerfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-06 03:47:57 +0000
commitb6e3dd65e22ef968bdc50ca35709439b3487e383 (patch)
tree039393d181bb08f19b86318385c11bae2f698e2d /gcc/java
parent3e33edbedc8ba9982f99c2f8e323f302e743cd6e (diff)
downloadgcc-b6e3dd65e22ef968bdc50ca35709439b3487e383.tar.gz
generalize build_case_label to the rest of the compiler
gcc/ada/ * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label. gcc/ * except.c (sjlj_emit_dispatch_table): Call build_case_label. * gimplify.c (gimplify_switch_expr): Likewise. * omp-low.c (expand_omp_sections): Likewise. * tree-eh.c (lower_try_finally_switch): Likewise. (lower_eh_dispatch): Likewise. * tree.h (build_case_label): Declare. * tree.c (build_case_label): Define. gcc/c-family/ * c-common.c (c_add_case_label): Omit the loc argument to build_case_label. * c-common.h (build_case_label): Remove. * c-semantics.c (build_case_label): Remove. gcc/cp/ * decl.c (finish_case_label): Omit the loc argument to build_case_label. gcc/fortran/ * trans-decl.c (gfc_trans_entry_master_switch): Call build_case_label. * trans-io.c (add_case): Likewise. * trans-stmt.c (gfc_trans_integer_select): Likewise. (gfc_trans_character_select): Likewise. gcc/go/ * go-gcc.cc (Gcc_backend::switch_statement): Call build_case_label. gcc/java/ * expr.c (expand_java_switch): Call build_case_label. (expand_java_add_case): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173467 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog5
-rw-r--r--gcc/java/expr.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index da52f91b76f..7dea6e43f54 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,8 @@
+2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
+
+ * expr.c (expand_java_switch): Call build_case_label.
+ (expand_java_add_case): Likewise.
+
2011-04-29 Richard Guenther <rguenther@suse.de>
PR middle-end/48819
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 53feab5ced3..3be1cff7d3f 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -1874,8 +1874,8 @@ expand_java_switch (tree selector, int default_pc)
NULL_TREE, NULL_TREE);
java_add_stmt (switch_expr);
- x = build3 (CASE_LABEL_EXPR, void_type_node, NULL_TREE, NULL_TREE,
- create_artificial_label (input_location));
+ x = build_case_label (NULL_TREE, NULL_TREE,
+ create_artificial_label (input_location));
append_to_statement_list (x, &SWITCH_BODY (switch_expr));
x = build1 (GOTO_EXPR, void_type_node, lookup_label (default_pc));
@@ -1891,8 +1891,8 @@ expand_java_add_case (tree switch_expr, int match, int target_pc)
value = build_int_cst (TREE_TYPE (switch_expr), match);
- x = build3 (CASE_LABEL_EXPR, void_type_node, value, NULL_TREE,
- create_artificial_label (input_location));
+ x = build_case_label (value, NULL_TREE,
+ create_artificial_label (input_location));
append_to_statement_list (x, &SWITCH_BODY (switch_expr));
x = build1 (GOTO_EXPR, void_type_node, lookup_label (target_pc));