[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
Mon Oct 9 10:46:30 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:
It might be useful to specify when this was introduced in libc++ in case this logic gets updated again in the future for an even newer libc++.
https://github.com/llvm/llvm-project/pull/68574
More information about the lldb-commits
mailing list