diff options
Diffstat (limited to 'gcc/except.c')
-rw-r--r-- | gcc/except.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/except.c b/gcc/except.c index 35d76cb8a82..48efbf9b8fc 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -88,7 +88,7 @@ int flag_non_call_exceptions; /* Protect cleanup actions with must-not-throw regions, with a call to the given failure handler. */ -tree protect_cleanup_actions; +tree (*lang_protect_cleanup_actions) PARAMS ((void)); /* Return true if type A catches type B. */ int (*lang_eh_type_covers) PARAMS ((tree a, tree b)); @@ -367,7 +367,6 @@ void init_eh () { ggc_add_rtx_root (&exception_handler_labels, 1); - ggc_add_tree_root (&protect_cleanup_actions, 1); if (! flag_exceptions) return; @@ -691,6 +690,7 @@ expand_eh_region_end_cleanup (handler) tree handler; { struct eh_region *region; + tree protect_cleanup_actions; rtx around_label; rtx data_save[2]; @@ -707,6 +707,13 @@ expand_eh_region_end_cleanup (handler) emit_label (region->label); + /* Give the language a chance to specify an action to be taken if an + exception is thrown that would propogate out of the HANDLER. */ + protect_cleanup_actions + = (lang_protect_cleanup_actions + ? (*lang_protect_cleanup_actions) () + : NULL_TREE); + if (protect_cleanup_actions) expand_eh_region_start (); |