[lto] PATCH: Add DIE readers for array and enum types

Sandra Loosemore sandra@codesourcery.com
Fri Sep 1 01:45:00 GMT 2006


Mark Mitchell wrote:

> !   if (name)
> !     TYPE_NAME (type) = name;
> 
> That seems like the right thing, but it isn't.  TYPE_NAME should 
> actually be a TYPE_DECL whose DECL_NAME is the IDENTIFIER_NODE with the 
> obvious name.  See lto_read_base_type_DIE for the correct incantations 
> here.

OK, I'm confused about this.  I swiped this code from c-decl.c; see start_enum 
and pushtag.  This is not exactly like the base_type case because the "name" 
here is just the enum tag, not a type name.  I also looked at type_tag in 
dwarf2out.c to see where it gets the enum tag name from, and it seems that it 
can be either an IDENTIFIER_NODE or TYPE_DECL stored in the TYPE_NAME field. 
So...  ???

-Sandra



More information about the Gcc-patches mailing list