diff options
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r-- | gcc/tree-eh.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index a046993..dfb3a27 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -2075,3 +2075,25 @@ maybe_clean_or_replace_eh_stmt (tree old_stmt, tree new_stmt) return false; } + +#ifdef ENABLE_CHECKING +static int +verify_eh_throw_stmt_node (void **slot, void *data ATTRIBUTE_UNUSED) +{ + struct throw_stmt_node *node = (struct throw_stmt_node *)*slot; + + gcc_assert (node->stmt->common.ann == NULL); + return 1; +} + +void +verify_eh_throw_table_statements (void) +{ + if (!get_eh_throw_stmt_table (cfun)) + return; + htab_traverse (get_eh_throw_stmt_table (cfun), + verify_eh_throw_stmt_node, + NULL); +} + +#endif |