File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
lldb/source/Plugins/Language/CPlusPlus Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -147,10 +147,27 @@ lldb::ValueObjectSP lldb_private::formatters::
147
147
if (!node_sp || error.Fail ())
148
148
return nullptr ;
149
149
150
- value_sp = node_sp->GetChildMemberWithName (" __value_" );
151
150
hash_sp = node_sp->GetChildMemberWithName (" __hash_" );
152
- if (!value_sp || ! hash_sp)
151
+ if (!hash_sp)
153
152
return nullptr ;
153
+
154
+ value_sp = node_sp->GetChildMemberWithName (" __value_" );
155
+ if (!value_sp) {
156
+ // clang-format off
157
+ // Since D101206 (ba79fb2e1f), libc++ wraps the `__value_` in an
158
+ // anonymous union.
159
+ // Child 0: __hash_node_base base class
160
+ // Child 1: __hash_
161
+ // Child 2: anonymous union
162
+ // clang-format on
163
+ auto anon_union_sp = node_sp->GetChildAtIndex (2 );
164
+ if (!anon_union_sp)
165
+ return nullptr ;
166
+
167
+ value_sp = anon_union_sp->GetChildMemberWithName (" __value_" );
168
+ if (!value_sp)
169
+ return nullptr ;
170
+ }
154
171
}
155
172
m_elements_cache.push_back (
156
173
{value_sp.get (), hash_sp->GetValueAsUnsigned (0 )});
You can’t perform that action at this time.
0 commit comments