diff options
author | Geoffrey Keating <geoffk@apple.com> | 2006-04-25 05:56:36 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2006-04-25 05:56:36 +0000 |
commit | 6f8d8ef049db5d96b2f30360d44670b9bd5248a9 (patch) | |
tree | 00d60bea3625a825409ec5c3bab2b4233a7de0f5 /gcc/dwarf2out.c | |
parent | efe1ad468ee736651ab40f75ad8fb576ed7f8a70 (diff) | |
download | gcc-6f8d8ef049db5d96b2f30360d44670b9bd5248a9.tar.gz |
dwarf2out.c (verify_marks_clear): New.
* dwarf2out.c (verify_marks_clear): New.
(prune_unused_types): Call verify_marks_clear initially, not
prune_unmark_dies.
From-SVN: r113241
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 6c01596e140..39a8c5c2496 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -13830,7 +13830,18 @@ output_indirect_string (void **h, void *v ATTRIBUTE_UNUSED) return 1; } +#if ENABLE_ASSERT_CHECKING +/* Verify that all marks are clear. */ +static void +verify_marks_clear (dw_die_ref die) +{ + dw_die_ref c; + + gcc_assert (! die->die_mark); + FOR_EACH_CHILD (die, c, verify_marks_clear (c)); +} +#endif /* ENABLE_ASSERT_CHECKING */ /* Clear the marks for a die and its children. Be cool if the mark isn't set. */ @@ -13845,7 +13856,6 @@ prune_unmark_dies (dw_die_ref die) FOR_EACH_CHILD (die, c, prune_unmark_dies (c)); } - /* Given DIE that we're marking as used, find any other dies it references as attributes and mark them as used. */ @@ -14046,10 +14056,12 @@ prune_unused_types (void) unsigned int i; limbo_die_node *node; - /* Clear all the marks. */ - prune_unmark_dies (comp_unit_die); +#if ENABLE_ASSERT_CHECKING + /* All the marks should already be clear. */ + verify_marks_clear (comp_unit_die); for (node = limbo_die_list; node; node = node->next) - prune_unmark_dies (node->die); + verify_marks_clear (node->die); +#endif /* ENABLE_ASSERT_CHECKING */ /* Set the mark on nodes that are actually used. */ prune_unused_types_walk (comp_unit_die); |