Skip to content

Commit 393b271

Browse files
Merge pull request swiftlang#1455 from augusto2112/remove-dynamic-class-type-check-materialization
Remove bypass of GetAddressOf when dealing with dynamic class types in variable materialization
2 parents 52fd0ee + 5b66545 commit 393b271

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

lldb/source/Expression/Materializer.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -489,19 +489,12 @@ class EntityVariable : public Materializer::Entity {
489489
}
490490
} else {
491491
AddressType address_type = eAddressTypeInvalid;
492-
const bool is_dynamic_class_type =
493-
m_is_generic &&
494-
(valobj_type.GetTypeClass() == lldb::eTypeClassClass);
495492
const bool scalar_is_load_address = m_is_generic; // this is the only
496493
// time we're dealing
497494
// with dynamic values
498495

499-
// if the dynamic type is a class, bypass the GetAddressOf() optimization
500-
// as it doesn't do the right thing
501496
lldb::addr_t addr_of_valobj =
502-
is_dynamic_class_type
503-
? LLDB_INVALID_ADDRESS
504-
: valobj_sp->GetAddressOf(scalar_is_load_address, &address_type);
497+
valobj_sp->GetAddressOf(scalar_is_load_address, &address_type);
505498

506499
// BEGIN Swift.
507500
if (lldb::ProcessSP process_sp =

0 commit comments

Comments
 (0)