[PATCH] D96334: Correctly recognize bitfields when emitting dwarf

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 4 05:45:58 PDT 2022


jmorse added a comment.

Green dragon mailed me a test failure:

  https://green.lab.llvm.org/green/job/lldb-cmake/42719/testReport/junit/lldb-api/lang_objc_bitfield_ivars/TestBitfieldIvars_py/

Which I can't replicate locally due to lack of objc sdk stuff. Fiddling with the input though, it looks like "field1" and "field2" of "@interface HasBitfield" don't get the DIFlagBitField flag, and thus don't get recognised as being bitfields as a result of this patch (and were before?).

That suggests there's more work to do / something exciting happening with flags in the frontend, however that's way out of my comfort zone. I'll revert later today if no-one has any other suggestions. A potential hacky workaround would be

  bool IsBitfield = DT->isBitField() || (FieldSize && Size != FieldSize);


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96334/new/

https://reviews.llvm.org/D96334



More information about the llvm-commits mailing list