[clang] [TBAA] Handle bitfields when generating !tbaa.struct metadata. (PR #82922)

Florian Hahn via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 26 05:02:36 PST 2024


fhahn wrote:

> This seems like it messes up the metadata in a different way: we have no representation of the bitfield at all, so it looks like it's padding.
> 
> I think we want to treat multiple adjacent bitfields as a single "field". So NamedBitfields from the testcase would have three fields in the LLVM TBAA data: one "field" containing both bitfields, followed by a field for the char, followed by a field for the double. You should be able to use CGBitFieldInfo for this, I think?

Thanks, updated the patch as suggested.

https://github.com/llvm/llvm-project/pull/82922


More information about the cfe-commits mailing list