@@ -2400,7 +2400,7 @@ bool SwiftLanguageRuntime::GetDynamicTypeAndAddress_Existential(
2400
2400
bool SwiftLanguageRuntime::GetDynamicTypeAndAddress_ExistentialMetatype (
2401
2401
ValueObject &in_value, CompilerType meta_type,
2402
2402
lldb::DynamicValueType use_dynamic, TypeAndOrName &class_type_or_name,
2403
- Address &address) {
2403
+ Address &address, Value::ValueType &value_type ) {
2404
2404
// Resolve the dynamic type of the metatype.
2405
2405
auto [ptr, address_type] = in_value.GetPointerValue ();
2406
2406
if (ptr == LLDB_INVALID_ADDRESS || ptr == 0 )
@@ -2445,6 +2445,7 @@ bool SwiftLanguageRuntime::GetDynamicTypeAndAddress_ExistentialMetatype(
2445
2445
tss->GetTypeSystemSwiftTypeRef ()->RemangleAsType (dem, wrapped, flavor);
2446
2446
class_type_or_name.SetCompilerType (meta_type);
2447
2447
address.SetRawAddress (ptr);
2448
+ value_type = Value::ValueType::LoadAddress;
2448
2449
return true ;
2449
2450
}
2450
2451
@@ -3120,10 +3121,10 @@ bool SwiftLanguageRuntime::GetDynamicTypeAndAddress(
3120
3121
success = GetDynamicTypeAndAddress_Class (in_value, val_type, use_dynamic,
3121
3122
class_type_or_name, address,
3122
3123
static_value_type, local_buffer);
3123
- else if (type_info.AllSet (eTypeIsMetatype | eTypeIsProtocol))
3124
+ else if (type_info.AllSet (eTypeIsMetatype | eTypeIsProtocol)) {
3124
3125
success = GetDynamicTypeAndAddress_ExistentialMetatype (
3125
- in_value, val_type, use_dynamic, class_type_or_name, address);
3126
- else if (type_info.AnySet (eTypeIsProtocol)) {
3126
+ in_value, val_type, use_dynamic, class_type_or_name, address, static_value_type );
3127
+ } else if (type_info.AnySet (eTypeIsProtocol)) {
3127
3128
if (type_info.AnySet (eTypeIsObjC))
3128
3129
success = GetDynamicTypeAndAddress_Class (in_value, val_type, use_dynamic,
3129
3130
class_type_or_name, address,
0 commit comments