This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]