[Lldb-commits] [PATCH] D114450: Improve optional formatter
walter erquinigo via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 23 10:17:34 PST 2021
wallace added a comment.
> That said, I'm more worried about the strange interactions between libc++ and libstdc++ formatters I reported.
yes, I'm trying to install libc++ on my machine now
================
Comment at: lldb/examples/synthetic/gnu_libstdcpp.py:24
self.value = self.payload.GetChildMemberWithName('_M_payload')
- self.count = self.payload.GetChildMemberWithName('_M_engaged').GetValueAsUnsigned(0)
+ self.has_value = self.payload.GetChildMemberWithName('_M_engaged').GetValueAsUnsigned(0) == 1
except:
----------------
labath wrote:
> I'd use `!= 0`, as matches what the actual implementation would do in this case.
If that's true, then I'd need to update the libcxx formatter. My understanding is that setting something to true is always compiled as `set to 1`, or am I wrong?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114450/new/
https://reviews.llvm.org/D114450
More information about the lldb-commits
mailing list