@@ -2400,7 +2400,7 @@ bool SwiftLanguageRuntime::GetDynamicTypeAndAddress_Existential(
24002400bool SwiftLanguageRuntime::GetDynamicTypeAndAddress_ExistentialMetatype (
24012401 ValueObject &in_value, CompilerType meta_type,
24022402 lldb::DynamicValueType use_dynamic, TypeAndOrName &class_type_or_name,
2403- Address &address) {
2403+ Address &address, Value::ValueType &value_type ) {
24042404 // Resolve the dynamic type of the metatype.
24052405 auto [ptr, address_type] = in_value.GetPointerValue ();
24062406 if (ptr == LLDB_INVALID_ADDRESS || ptr == 0 )
@@ -2445,6 +2445,7 @@ bool SwiftLanguageRuntime::GetDynamicTypeAndAddress_ExistentialMetatype(
24452445 tss->GetTypeSystemSwiftTypeRef ()->RemangleAsType (dem, wrapped, flavor);
24462446 class_type_or_name.SetCompilerType (meta_type);
24472447 address.SetRawAddress (ptr);
2448+ value_type = Value::ValueType::LoadAddress;
24482449 return true ;
24492450}
24502451
@@ -3120,10 +3121,10 @@ bool SwiftLanguageRuntime::GetDynamicTypeAndAddress(
31203121 success = GetDynamicTypeAndAddress_Class (in_value, val_type, use_dynamic,
31213122 class_type_or_name, address,
31223123 static_value_type, local_buffer);
3123- else if (type_info.AllSet (eTypeIsMetatype | eTypeIsProtocol))
3124+ else if (type_info.AllSet (eTypeIsMetatype | eTypeIsProtocol)) {
31243125 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)) {
31273128 if (type_info.AnySet (eTypeIsObjC))
31283129 success = GetDynamicTypeAndAddress_Class (in_value, val_type, use_dynamic,
31293130 class_type_or_name, address,
0 commit comments