aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@apple.com>2006-04-25 05:56:36 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2006-04-25 05:56:36 +0000
commit6f8d8ef049db5d96b2f30360d44670b9bd5248a9 (patch)
tree00d60bea3625a825409ec5c3bab2b4233a7de0f5 /gcc
parentefe1ad468ee736651ab40f75ad8fb576ed7f8a70 (diff)
downloadgcc-6f8d8ef049db5d96b2f30360d44670b9bd5248a9.zip
gcc-6f8d8ef049db5d96b2f30360d44670b9bd5248a9.tar.gz
gcc-6f8d8ef049db5d96b2f30360d44670b9bd5248a9.tar.bz2
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')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/dwarf2out.c20
2 files changed, 22 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9f19a12..fb0e9d3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2006-04-24 Geoffrey Keating <geoffk@apple.com>
+
+ * dwarf2out.c (verify_marks_clear): New.
+ (prune_unused_types): Call verify_marks_clear initially, not
+ prune_unmark_dies.
+
2006-04-24 Bernd Schmidt <bernd.schmidt@analog.com>
* rtl.def (SS_ASHIFT, SS_NEG): New codes.
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 6c01596..39a8c5c 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);