[Lldb-commits] [PATCH] D157022: Fix the NSIndexSet formatter for macOS Sonoma

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 3 12:16:51 PDT 2023


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_popcount` and friends are GNU extensions not supported by MSVC. You'll probably need to abstract this out with C preprocessor macro guards.

Alternatively, I think llvm has its own `popcount` implementation with `llvm::popcount` in `include/llvm/ADT/bit.h`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157022



More information about the lldb-commits mailing list