[Lldb-commits] [lldb] [lldb][DataFormatter] unordered_map: account for new libc++ __hash_node layout (PR #68574)
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 10 10:03:29 PDT 2023
================
@@ -162,10 +162,21 @@ lldb::ValueObjectSP lldb_private::formatters::
if (!node_sp || error.Fail())
return nullptr;
- value_sp = node_sp->GetChildMemberWithName("__value_");
hash_sp = node_sp->GetChildMemberWithName("__hash_");
- if (!value_sp || !hash_sp)
+ if (!hash_sp)
return nullptr;
+
+ value_sp = node_sp->GetChildMemberWithName("__value_");
+ if (!value_sp) {
+ // Newer libc++ versions wrap the `__value_` in an anonymous union.
----------------
bulbazord wrote:
Definitely better. I assume phabricator will be read-only mode for quite a while to come, so I'm not too worried about it being difficult to find. We should probably update it with a commit hash once it lands though.
https://github.com/llvm/llvm-project/pull/68574
More information about the lldb-commits
mailing list