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:

(lto_read_enumeration_type_DIE): New.

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.

-Sandra


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