@@ -2391,7 +2391,7 @@ bool SwiftLanguageRuntime::GetDynamicTypeAndAddress_Existential(
23912391bool SwiftLanguageRuntime::GetDynamicTypeAndAddress_ExistentialMetatype (
23922392 ValueObject &in_value, CompilerType meta_type,
23932393 lldb::DynamicValueType use_dynamic, TypeAndOrName &class_type_or_name,
2394- Address &address) {
2394+ Address &address, Value::ValueType &value_type ) {
23952395 // Resolve the dynamic type of the metatype.
23962396 AddressType address_type;
23972397 lldb::addr_t ptr = in_value.GetPointerValue (&address_type);
@@ -2437,6 +2437,7 @@ bool SwiftLanguageRuntime::GetDynamicTypeAndAddress_ExistentialMetatype(
24372437 tss->GetTypeSystemSwiftTypeRef ()->RemangleAsType (dem, wrapped, flavor);
24382438 class_type_or_name.SetCompilerType (meta_type);
24392439 address.SetRawAddress (ptr);
2440+ value_type = Value::ValueType::LoadAddress;
24402441 return true ;
24412442}
24422443
@@ -3114,10 +3115,10 @@ bool SwiftLanguageRuntime::GetDynamicTypeAndAddress(
31143115 success = GetDynamicTypeAndAddress_Class (in_value, val_type, use_dynamic,
31153116 class_type_or_name, address,
31163117 static_value_type, local_buffer);
3117- else if (type_info.AllSet (eTypeIsMetatype | eTypeIsProtocol))
3118+ else if (type_info.AllSet (eTypeIsMetatype | eTypeIsProtocol)) {
31183119 success = GetDynamicTypeAndAddress_ExistentialMetatype (
3119- in_value, val_type, use_dynamic, class_type_or_name, address);
3120- else if (type_info.AnySet (eTypeIsProtocol)) {
3120+ in_value, val_type, use_dynamic, class_type_or_name, address, static_value_type );
3121+ } else if (type_info.AnySet (eTypeIsProtocol)) {
31213122 if (type_info.AnySet (eTypeIsObjC))
31223123 success = GetDynamicTypeAndAddress_Class (in_value, val_type, use_dynamic,
31233124 class_type_or_name, address,
0 commit comments