This is the mail archive of the
mailing list for the GCC project.
Re: [lto] PATCH: Add DIE readers for array and enum types
- From: Sandra Loosemore <sandra at codesourcery dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 31 Aug 2006 20:54:46 -0400
- Subject: Re: [lto] PATCH: Add DIE readers for array and enum types
- References: <44F73448.firstname.lastname@example.org> <44F745AA.email@example.com>
Mark Mitchell wrote:
Do you really need to reconcile the DW_AT_byte_size and DW_AT_type
things here, using lto_find_integral_type? I would suggest that GCC
should always emit DW_AT_type, and that you just check that
DW_AT_byte_size, if present, matches the size type specified by DW_AT_type.
The DWARF spec says that the enumeration type entry "has" the DW_AT_byte_size
attribute, and "may also have" DW_AT_type, so yes, I think the lookup and
reconciliation are necessary. It doesn't say what to do if the sizes are
incompatible (the case I didn't implement yet in lto_find_integral_type),
but for DW_TAG_subrange_type and DW_TAG_set_type, DW_AT_byte_size is supposed to
override the "normal" size of the specified base type. Not sure if GCC ever
generates output like that; it seemed easier to punt for now. :-P
I'm working on fixing the other things up.