This is an archive of the discontinued LLVM Phabricator instance.

[Clang][CGDebugInfo][ObjC] Mark objc bitfields with the DIFlagBitfield flag
ClosedPublic

Authored by jmmartinez on Dec 16 2022, 2:41 AM.

Diff Detail

Event Timeline

jmmartinez created this revision.Dec 16 2022, 2:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 16 2022, 2:41 AM
jmmartinez requested review of this revision.Dec 16 2022, 2:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 16 2022, 2:41 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

clang-format

How does this affect the generated DWARF? Have you tested that this does the right thing in LLDB?

How does this affect the generated DWARF? Have you tested that this does the right thing in LLDB?

It shouldn't affect the generated DWARF on LLVM's main branch.
Currently, LLVM relies on the field size to know if a member is a bitfield or not.

However, if we apply the patch https://reviews.llvm.org/D96334 , if the DIFlagBitField attribute is not added, the members won't be treated as bitfields.

Unluckly, I wasn't able to test the combination of https://reviews.llvm.org/D96334 and this patch together. If you have some pointers about how to trigger a test job on "Green Dragon", or how to test lldb's objective-c tests on Linux I'd be happy to test.

aprantl accepted this revision.Dec 20 2022, 11:22 AM

Unluckly, I wasn't able to test the combination of https://reviews.llvm.org/D96334 and this patch together. If you have some pointers about how to trigger a test job on "Green Dragon", or how to test lldb's objective-c tests on Linux I'd be happy to test.

There's no way to request a test from green dragon. There is also no way to test LLDB's Objective-C support on Linux, or at least I'm not aware of anyone maintaining a port of LLDB to the GNUstep Objective-C runtime.
So I tried out the patch on a Mac locally and the entire LLDB testsuite still passes.

This revision is now accepted and ready to land.Dec 20 2022, 11:22 AM

Unluckly, I wasn't able to test the combination of https://reviews.llvm.org/D96334 and this patch together. If you have some pointers about how to trigger a test job on "Green Dragon", or how to test lldb's objective-c tests on Linux I'd be happy to test.

There's no way to request a test from green dragon. There is also no way to test LLDB's Objective-C support on Linux, or at least I'm not aware of anyone maintaining a port of LLDB to the GNUstep Objective-C runtime.
So I tried out the patch on a Mac locally and the entire LLDB testsuite still passes.

Thanks for the help in testing! Did you happen to test with https://reviews.llvm.org/D96334 ? If you confirm I'll "revert the revert" (commit 920de9c94caff0b3ac21bf637487b07cb9aea98a).