@@ -413,20 +413,14 @@ class EntityVariable : public Materializer::Entity {
413
413
public:
414
414
EntityVariable (lldb::VariableSP &variable_sp)
415
415
: Entity(), m_variable_sp(variable_sp), m_is_reference(false ),
416
- m_is_generic ( false ), m_temporary_allocation(LLDB_INVALID_ADDRESS),
416
+ m_temporary_allocation (LLDB_INVALID_ADDRESS),
417
417
m_temporary_allocation_size(0 ) {
418
418
// Hard-coding to maximum size of a pointer since all variables are
419
419
// materialized by reference
420
420
m_size = 8 ;
421
421
m_alignment = 8 ;
422
422
m_is_reference =
423
423
m_variable_sp->GetType ()->GetForwardCompilerType ().IsReferenceType ();
424
- #ifdef LLDB_ENABLE_SWIFT
425
- m_is_generic = SwiftASTContext::IsGenericType (
426
- m_variable_sp->GetType ()->GetForwardCompilerType ());
427
- #else // !LLDB_ENABLE_SWIFT
428
- m_is_generic = false ;
429
- #endif // LLDB_ENABLE_SWIFT
430
424
}
431
425
432
426
void Materialize (lldb::StackFrameSP &frame_sp, IRMemoryMap &map,
@@ -495,13 +489,10 @@ class EntityVariable : public Materializer::Entity {
495
489
}
496
490
} else {
497
491
AddressType address_type = eAddressTypeInvalid;
498
- const bool is_dynamic_class_type =
499
- m_is_generic &&
500
- (valobj_type.GetTypeClass () == lldb::eTypeClassClass);
501
- const bool scalar_is_load_address = m_is_generic; // this is the only
502
- // time we're dealing
503
- // with dynamic values
504
-
492
+ const bool scalar_is_load_address = false ;
493
+ lldb::addr_t addr_of_valobj =
494
+ valobj_sp->GetAddressOf (scalar_is_load_address, &address_type);
495
+
505
496
// if the dynamic type is a class, bypass the GetAddressOf() optimization
506
497
// as it doesn't do the right thing
507
498
lldb::addr_t addr_of_valobj =
@@ -808,7 +799,6 @@ class EntityVariable : public Materializer::Entity {
808
799
private:
809
800
lldb::VariableSP m_variable_sp;
810
801
bool m_is_reference;
811
- bool m_is_generic;
812
802
lldb::addr_t m_temporary_allocation;
813
803
size_t m_temporary_allocation_size;
814
804
lldb::DataBufferSP m_original_data;
0 commit comments