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

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 25 20:53:03 PST 2024


efriedma-quic 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?

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


More information about the cfe-commits mailing list