jingham marked an inline comment as done.
jingham added inline comments.
Comment at: lldb/source/Plugins/Language/ObjC/Cocoa.cpp:303
+return false;
+ count = llvm::popcount(bitfield);
+ break;
bulbazord wrote:
> This clobbers the pre
jingham updated this revision to Diff 547048.
jingham added a comment.
Remove redundant code
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157022/new/
https://reviews.llvm.org/D157022
Files:
lldb/source/Plugins/Language/ObjC/Cocoa.cpp
Index: l
bulbazord added a comment.
It would be nice if we could clean up what `mode` is. There's a lot of bit-wise
operations and setting it to 1 and 2 and it's not clear what each one might
mean in each case... Some kind of enum or semantic meaning for each number
would be nice. Either way, I think I'
jingham added inline comments.
Comment at: lldb/source/Plugins/Language/ObjC/Cocoa.cpp:278
+ && descriptor->GetTaggedPointerInfo(nullptr, nullptr, &payload)) {
+count = __builtin_popcountll(payload);
+break;
bulbazord wrote:
> I'm pretty
jingham updated this revision to Diff 546976.
jingham marked an inline comment as done.
jingham added a comment.
Use llvm::popcount instead of using the builtin directly.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157022/new/
https://reviews.llv
bulbazord added inline comments.
Comment at: lldb/source/Plugins/Language/ObjC/Cocoa.cpp:278
+ && descriptor->GetTaggedPointerInfo(nullptr, nullptr, &payload)) {
+count = __builtin_popcountll(payload);
+break;
I'm pretty sure `__builtin_p
mib added inline comments.
Comment at: lldb/source/Plugins/Language/ObjC/Cocoa.cpp:294
+ // This is the bitfield case. The bitfield is a uint64_t:
+ count = process_sp->ReadUnsignedIntegerFromMemory(
+ valobj_addr + 2 * ptr_size, 8, 0, error);
jingham created this revision.
jingham added reviewers: JDevlieghere, bulbazord, mib.
Herald added a subscriber: arphaman.
Herald added a project: All.
jingham requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
Just mutatis mutandis for the Fo