From bf6102ae18353af8e717f549a58acd2a2ab46285 Mon Sep 17 00:00:00 2001 From: steven Date: Fri, 4 Jun 2004 12:31:26 +0000 Subject: * 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 --- gcc/except.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'gcc/except.c') 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. */ -- cgit v1.2.1