@@ -269,11 +269,6 @@ bool lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd::GetDataType() {
269
269
deref = m_root_node->Dereference (error);
270
270
if (!deref || error.Fail ())
271
271
return false ;
272
- deref = deref->GetChildMemberWithName (" __value_" );
273
- if (deref) {
274
- m_element_type = deref->GetCompilerType ();
275
- return true ;
276
- }
277
272
deref = m_backend.GetChildAtNamePath ({" __tree_" , " __pair3_" });
278
273
if (!deref)
279
274
return false ;
@@ -301,40 +296,35 @@ void lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd::GetValueOffset(
301
296
return ;
302
297
if (!node)
303
298
return ;
299
+
304
300
CompilerType node_type (node->GetCompilerType ());
305
- uint64_t bit_offset;
306
- if (node_type.GetIndexOfFieldWithName (" __value_" , nullptr , &bit_offset) !=
307
- UINT32_MAX) {
308
- // Old layout (pre d05b10ab4fc65)
309
- m_skip_size = bit_offset / 8u ;
310
- } else {
311
- auto ast_ctx = node_type.GetTypeSystem ().dyn_cast_or_null <TypeSystemClang>();
312
- if (!ast_ctx)
313
- return ;
314
- CompilerType tree_node_type = ast_ctx->CreateStructForIdentifier (
315
- llvm::StringRef (),
316
- {{" ptr0" , ast_ctx->GetBasicType (lldb::eBasicTypeVoid).GetPointerType ()},
317
- {" ptr1" , ast_ctx->GetBasicType (lldb::eBasicTypeVoid).GetPointerType ()},
318
- {" ptr2" , ast_ctx->GetBasicType (lldb::eBasicTypeVoid).GetPointerType ()},
319
- {" cw" , ast_ctx->GetBasicType (lldb::eBasicTypeBool)},
320
- {" payload" , (m_element_type.GetCompleteType (), m_element_type)}});
321
- std::string child_name;
322
- uint32_t child_byte_size;
323
- int32_t child_byte_offset = 0 ;
324
- uint32_t child_bitfield_bit_size;
325
- uint32_t child_bitfield_bit_offset;
326
- bool child_is_base_class;
327
- bool child_is_deref_of_parent;
328
- uint64_t language_flags;
329
- auto child_type =
330
- llvm::expectedToStdOptional (tree_node_type.GetChildCompilerTypeAtIndex (
331
- nullptr , 4 , true , true , true , child_name, child_byte_size,
332
- child_byte_offset, child_bitfield_bit_size,
333
- child_bitfield_bit_offset, child_is_base_class,
334
- child_is_deref_of_parent, nullptr , language_flags));
335
- if (child_type && child_type->IsValid ())
336
- m_skip_size = (uint32_t )child_byte_offset;
337
- }
301
+ auto ast_ctx = node_type.GetTypeSystem ().dyn_cast_or_null <TypeSystemClang>();
302
+ if (!ast_ctx)
303
+ return ;
304
+
305
+ CompilerType tree_node_type = ast_ctx->CreateStructForIdentifier (
306
+ llvm::StringRef (),
307
+ {{" ptr0" , ast_ctx->GetBasicType (lldb::eBasicTypeVoid).GetPointerType ()},
308
+ {" ptr1" , ast_ctx->GetBasicType (lldb::eBasicTypeVoid).GetPointerType ()},
309
+ {" ptr2" , ast_ctx->GetBasicType (lldb::eBasicTypeVoid).GetPointerType ()},
310
+ {" cw" , ast_ctx->GetBasicType (lldb::eBasicTypeBool)},
311
+ {" payload" , (m_element_type.GetCompleteType (), m_element_type)}});
312
+ std::string child_name;
313
+ uint32_t child_byte_size;
314
+ int32_t child_byte_offset = 0 ;
315
+ uint32_t child_bitfield_bit_size;
316
+ uint32_t child_bitfield_bit_offset;
317
+ bool child_is_base_class;
318
+ bool child_is_deref_of_parent;
319
+ uint64_t language_flags;
320
+ auto child_type =
321
+ llvm::expectedToStdOptional (tree_node_type.GetChildCompilerTypeAtIndex (
322
+ nullptr , 4 , true , true , true , child_name, child_byte_size,
323
+ child_byte_offset, child_bitfield_bit_size, child_bitfield_bit_offset,
324
+ child_is_base_class, child_is_deref_of_parent, nullptr ,
325
+ language_flags));
326
+ if (child_type && child_type->IsValid ())
327
+ m_skip_size = (uint32_t )child_byte_offset;
338
328
}
339
329
340
330
ValueObjectSP
@@ -369,14 +359,8 @@ lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd::GetKeyValuePair(
369
359
return nullptr ;
370
360
371
361
GetValueOffset (iterated_sp);
372
- auto child_sp = iterated_sp->GetChildMemberWithName (" __value_" );
373
- if (child_sp) {
374
- // Old layout (pre 089a7cc5dea)
375
- iterated_sp = child_sp;
376
- } else {
377
- iterated_sp = iterated_sp->GetSyntheticChildAtOffset (
378
- m_skip_size, m_element_type, true );
379
- }
362
+ iterated_sp = iterated_sp->GetSyntheticChildAtOffset (m_skip_size,
363
+ m_element_type, true );
380
364
381
365
if (!iterated_sp)
382
366
return nullptr ;
0 commit comments