Skip to content

Commit 692207c

Browse files
Merge pull request #1456 from augusto2112/remove-dynamic-class-type-check-materialization-next
Remove bypass of GetAddressOf when dealing with dynamic class types in variable materialization (swift/master-next)
2 parents 69dd5c1 + 92c011a commit 692207c

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
@@ -494,19 +494,12 @@ class EntityVariable : public Materializer::Entity {
494494
}
495495
} else {
496496
AddressType address_type = eAddressTypeInvalid;
497-
const bool is_dynamic_class_type =
498-
m_is_generic &&
499-
(valobj_type.GetTypeClass() == lldb::eTypeClassClass);
500497
const bool scalar_is_load_address = m_is_generic; // this is the only
501498
// time we're dealing
502499
// with dynamic values
503500

504-
// if the dynamic type is a class, bypass the GetAddressOf() optimization
505-
// as it doesn't do the right thing
506501
lldb::addr_t addr_of_valobj =
507-
is_dynamic_class_type
508-
? LLDB_INVALID_ADDRESS
509-
: valobj_sp->GetAddressOf(scalar_is_load_address, &address_type);
502+
valobj_sp->GetAddressOf(scalar_is_load_address, &address_type);
510503

511504
// BEGIN Swift.
512505
if (lldb::ProcessSP process_sp =

0 commit comments

Comments
 (0)