r241916 - Respect alignment of nested bitfields

Ulrich Weigand Ulrich.Weigand at de.ibm.com
Mon Jul 13 04:53:15 PDT 2015


David Majnemer <david.majnemer at gmail.com> wrote on 11.07.2015 07:05:14:

>>          // FirstFieldOffset is not appropriate for bitfields,
>>          // it won't tell us what the storage offset should be and
>> thus might not
>>          // be properly aligned.
>>          //
>>          // Instead calculate the storage offset using the offset of
>> the field in
>>          // the struct type.
>>
>> This comment seems out of date now that we are not using the LLVM
>> struct type's layout to calculate FirstByteOffset.

Good point.  I've updated the comment in r242021.

Thanks,
Ulrich





More information about the cfe-commits mailing list