[incremental] Patch: FYI: two dwarf2out.c updates

Tom Tromey tromey@redhat.com
Tue Mar 11 23:17:00 GMT 2008


I'm checking this in on the incremental-compiler branch.

On the branch I'm using custom functions rather than TREE_ASM_WRITTEN
in dwarf2out.  This patch updates some code brought in via a merge to
be consistent.

Also, this changes hash_type_die_entry to use TYPE_UID.  I had been
using the pointer, but that is a PCH no-no; the libstdc++ build caught
this.

I'm not at all sure that this particular batch of changes to dwarf2out
was a good idea.  I will probably re-investigate this.

Meanwhile, this lets us build libstdc++ again.

Tom

2008-03-11  Tom Tromey  <tromey@redhat.com>

	* dwarf2out.c (hash_type_die_entry): Use TYPE_UID.
	(reference_to_unused): Use seen_decl_p.
	(gen_type_die_with_usage): Use seen_decl_p and mark_decl.o

Index: dwarf2out.c
===================================================================
--- dwarf2out.c	(revision 132956)
+++ dwarf2out.c	(working copy)
@@ -5787,7 +5787,7 @@
 hash_type_die_entry (const void *ep)
 {
   const struct type_die_entry *entry = (const struct type_die_entry *) ep;
-  return htab_hash_pointer (entry->type);
+  return TYPE_UID (entry->type);
 }
 
 /* Compare two struct type_die_entry's for equality.  */
@@ -10465,7 +10465,7 @@
       if (!node->output)
 	return *tp;
     }
-  else if (TREE_CODE (*tp) == STRING_CST && !TREE_ASM_WRITTEN (*tp))
+  else if (TREE_CODE (*tp) == STRING_CST && !seen_decl_p (*tp))
     return *tp;
 
   return NULL_TREE;
@@ -13368,12 +13368,12 @@
     }
 
   /* If this is an array type with hidden descriptor, handle it first.  */
-  if (!TREE_ASM_WRITTEN (type)
+  if (!seen_decl_p (type)
       && lang_hooks.types.get_array_descr_info
       && lang_hooks.types.get_array_descr_info (type, &info))
     {
       gen_descr_array_type_die (type, &info, context_die);
-      TREE_ASM_WRITTEN (type) = 1;
+      mark_decl (type);
       return;
     }
 



More information about the Gcc-patches mailing list