diff options
Diffstat (limited to 'gcc/except.c')
-rw-r--r-- | gcc/except.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/except.c b/gcc/except.c index 939610ffc1f..fa92368ec8d 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -1401,6 +1401,23 @@ find_exception_handler_labels () exception_handler_labels = list; } +bool +current_function_has_exception_handlers () +{ + int i; + + for (i = cfun->eh->last_region_number; i > 0; --i) + { + struct eh_region *region = cfun->eh->region_array[i]; + + if (! region || region->region_number != i) + continue; + if (region->type != ERT_THROW) + return true; + } + + return false; +} static struct eh_region * duplicate_eh_region_1 (o, map) |