diff options
author | Steven Bosscher <stevenb@suse.de> | 2004-06-04 12:31:26 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2004-06-04 12:31:26 +0000 |
commit | f698d2175aa01ae5be342ac6ea6d09366b8b36a4 (patch) | |
tree | e04c020e220e3d0c79856e9ab76432e2e9ba87ed /gcc/except.c | |
parent | 72fab006113a72f011e261cb291602195726f7d5 (diff) | |
download | gcc-f698d2175aa01ae5be342ac6ea6d09366b8b36a4.zip gcc-f698d2175aa01ae5be342ac6ea6d09366b8b36a4.tar.gz gcc-f698d2175aa01ae5be342ac6ea6d09366b8b36a4.tar.bz2 |
except.c (for_each_eh_region): New function.
* except.c (for_each_eh_region): New function.
* except.h (for_each_eh_region): Add a prototype for it.
* tree-cfg.c (update_eh_labels): New function, callback for
for_each_eh_region.
(label_for_bb): Make global static, unfortunately.
(cleanup_dead_labels): Also update label references for
exception regions.
From-SVN: r82622
Diffstat (limited to 'gcc/except.c')
-rw-r--r-- | gcc/except.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/except.c b/gcc/except.c index f3bc4ef..65aa8b5 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -2742,6 +2742,20 @@ for_each_eh_label_1 (void **pentry, void *data) (*callback) (entry->label); return 1; } + +/* Invoke CALLBACK for every exception region in the current function. */ + +void +for_each_eh_region (void (*callback) (struct eh_region *)) +{ + int i, n = cfun->eh->last_region_number; + for (i = 1; i <= n; ++i) + { + struct eh_region *region = cfun->eh->region_array[i]; + if (region) + (*callback) (region); + } +} /* This section describes CFG exception edges for flow. */ |