aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-gimplify.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-05-14 14:55:10 -0400
committerJason Merrill <jason@gcc.gnu.org>2010-05-14 14:55:10 -0400
commit786f715dc6869bac7a3018e880a4ffde41940422 (patch)
treef181defcfc86100bea4bb762184c7584637432cc /gcc/cp/cp-gimplify.c
parent19fb0b860f5b70c3fa0bbf7ef02afd7b95634231 (diff)
downloadgcc-786f715dc6869bac7a3018e880a4ffde41940422.zip
gcc-786f715dc6869bac7a3018e880a4ffde41940422.tar.gz
gcc-786f715dc6869bac7a3018e880a4ffde41940422.tar.bz2
re PR c++/44127 (G++ emits unnecessary EH code)
PR c++/44127 gcc: * gimplify.c (gimplify_seq_add_stmt): No longer static. * gimple.h: Declare it. * gimple.c (gimple_build_eh_filter): No ops. gcc/cp: * cp-gimplify.c (gimplify_must_not_throw_expr): Use gimple_build_eh_must_not_throw. From-SVN: r159407
Diffstat (limited to 'gcc/cp/cp-gimplify.c')
-rw-r--r--gcc/cp/cp-gimplify.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c
index d6ae28f..2e3f11d 100644
--- a/gcc/cp/cp-gimplify.c
+++ b/gcc/cp/cp-gimplify.c
@@ -480,11 +480,16 @@ gimplify_must_not_throw_expr (tree *expr_p, gimple_seq *pre_p)
tree stmt = *expr_p;
tree temp = voidify_wrapper_expr (stmt, NULL);
tree body = TREE_OPERAND (stmt, 0);
+ gimple_seq try_ = NULL;
+ gimple_seq catch_ = NULL;
+ gimple mnt;
- stmt = build_gimple_eh_filter_tree (body, NULL_TREE,
- build_call_n (terminate_node, 0));
+ gimplify_and_add (body, &try_);
+ mnt = gimple_build_eh_must_not_throw (terminate_node);
+ gimplify_seq_add_stmt (&catch_, mnt);
+ mnt = gimple_build_try (try_, catch_, GIMPLE_TRY_CATCH);
- gimplify_and_add (stmt, pre_p);
+ gimplify_seq_add_stmt (pre_p, mnt);
if (temp)
{
*expr_p = temp;