diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-14 19:18:58 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-14 19:18:58 +0000 |
commit | e38def9ca7953bb5611d08ce8617249516ba5a99 (patch) | |
tree | 2fcbbb5f99b13293753d83230cf9f4e0893a9b51 /gcc/cp | |
parent | 74facf6eece2aa84e36088e8e9adf175920b2e8a (diff) | |
download | gcc-e38def9ca7953bb5611d08ce8617249516ba5a99.tar.gz |
Squash commit of EH in gimple
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151696 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/cp/except.c | 14 | ||||
-rw-r--r-- | gcc/cp/optimize.c | 2 |
3 files changed, 14 insertions, 10 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a50e9fcaf25..4a17a77dbec 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,11 @@ +2009-09-14 Richard Henderson <rth@redhat.com> + + * except.c (init_exception_processing): Don't call + default_init_unwind_resume_libfunc. + (cp_protect_cleanup_actions): Return the decl to call. + (build_exc_ptr): Use __builtin_eh_pointer. + * optimize.c (clone_body): Set eh_lp_nr, not eh_region. + 2009-09-13 Richard Guenther <rguenther@suse.de> Rafael Avila de Espindola <espindola@google.com> diff --git a/gcc/cp/except.c b/gcc/cp/except.c index 588c2ee68d8..1b13819ed67 100644 --- a/gcc/cp/except.c +++ b/gcc/cp/except.c @@ -53,7 +53,7 @@ static tree wrap_cleanups_r (tree *, int *, void *); static int complete_ptr_ref_or_void_ptr_p (tree, tree); static bool is_admissible_throw_operand (tree); static int can_convert_eh (tree, tree); -static gimple cp_protect_cleanup_actions (void); +static tree cp_protect_cleanup_actions (void); /* Sets up all the global eh stuff that needs to be initialized at the start of compilation. */ @@ -77,25 +77,20 @@ init_exception_processing (void) call_unexpected_node = push_throw_library_fn (get_identifier ("__cxa_call_unexpected"), tmp); - if (targetm.arm_eabi_unwinder) - unwind_resume_libfunc = init_one_libfunc ("__cxa_end_cleanup"); - else - default_init_unwind_resume_libfunc (); - lang_protect_cleanup_actions = &cp_protect_cleanup_actions; } /* Returns an expression to be executed if an unhandled exception is propagated out of a cleanup region. */ -static gimple +static tree cp_protect_cleanup_actions (void) { /* [except.terminate] When the destruction of an object during stack unwinding exits using an exception ... void terminate(); is called. */ - return gimple_build_call (terminate_node, 0); + return terminate_node; } static tree @@ -154,7 +149,8 @@ build_eh_type_type (tree type) tree build_exc_ptr (void) { - return build0 (EXC_PTR_EXPR, ptr_type_node); + return build_call_n (built_in_decls [BUILT_IN_EH_POINTER], + 1, integer_zero_node); } /* Declare a function NAME, returning RETURN_TYPE, taking a single diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c index abd38f8666c..58d5b9001d2 100644 --- a/gcc/cp/optimize.c +++ b/gcc/cp/optimize.c @@ -99,7 +99,7 @@ clone_body (tree clone, tree fn, void *arg_map) id.transform_lang_insert_block = NULL; /* We're not inside any EH region. */ - id.eh_region = -1; + id.eh_lp_nr = 0; stmts = DECL_SAVED_TREE (fn); walk_tree (&stmts, copy_tree_body_r, &id, NULL); |