summaryrefslogtreecommitdiff
path: root/gcc/except.c
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-04 12:31:26 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-04 12:31:26 +0000
commitbf6102ae18353af8e717f549a58acd2a2ab46285 (patch)
treee04c020e220e3d0c79856e9ab76432e2e9ba87ed /gcc/except.c
parente6bbfb8c93df7b4643ebe84f42e91b0cf074ea62 (diff)
downloadgcc-bf6102ae18353af8e717f549a58acd2a2ab46285.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82622 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/except.c')
-rw-r--r--gcc/except.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/except.c b/gcc/except.c
index f3bc4ef3f2c..65aa8b5c4cc 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. */