summaryrefslogtreecommitdiff
path: root/gcc/tree-eh.c
diff options
context:
space:
mode:
authordavidxl <davidxl@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-09 16:09:23 +0000
committerdavidxl <davidxl@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-09 16:09:23 +0000
commit10e20ba5c8568167a43fe1fbecc1454eeed39ba4 (patch)
tree4df88ba9bea41f8d545aabd4a90d1d88d969a1e6 /gcc/tree-eh.c
parent40258d04c3c791745ab7e2788510adc024f111ea (diff)
downloadgcc-10e20ba5c8568167a43fe1fbecc1454eeed39ba4.tar.gz
Gator cleanup
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174848 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r--gcc/tree-eh.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index e87c32e798b..7d27e0c90a7 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -3234,6 +3234,9 @@ execute_lower_eh_dispatch (void)
bool any_rewritten = false;
bool redirected = false;
+ if (cfun->eh->region_tree == NULL)
+ return 0;
+
assign_filter_values ();
FOR_EACH_BB (bb)
@@ -3254,7 +3257,7 @@ execute_lower_eh_dispatch (void)
static bool
gate_lower_eh_dispatch (void)
{
- return cfun->eh->region_tree != NULL;
+ return true;
}
struct gimple_opt_pass pass_lower_eh_dispatch =
@@ -3983,8 +3986,12 @@ execute_cleanup_eh_1 (void)
static unsigned int
execute_cleanup_eh (void)
{
- int ret = execute_cleanup_eh_1 ();
+ int ret;
+ if (cfun->eh == NULL || cfun->eh->region_tree == NULL)
+ return 0;
+
+ ret = execute_cleanup_eh_1 ();
/* If the function no longer needs an EH personality routine
clear it. This exposes cross-language inlining opportunities
and avoids references to a never defined personality routine. */
@@ -3998,7 +4005,7 @@ execute_cleanup_eh (void)
static bool
gate_cleanup_eh (void)
{
- return cfun->eh != NULL && cfun->eh->region_tree != NULL;
+ return true;
}
struct gimple_opt_pass pass_cleanup_eh = {