@@ -2023,27 +2023,8 @@ bool SwiftLanguageRuntimeImpl::GetDynamicTypeAndAddress_IndirectEnumCase(
2023
2023
return false ;
2024
2024
2025
2025
Flags type_info (payload_type.GetTypeInfo ());
2026
- if (type_info.AllSet (eTypeIsSwift | eTypeIsClass)) {
2027
- lldb::addr_t old_box_value = box_value;
2028
- box_value = m_process.ReadPointerFromMemory (box_value, error);
2029
- if (box_value == LLDB_INVALID_ADDRESS)
2030
- return false ;
2031
-
2032
- DataExtractor data (&box_value, m_process.GetAddressByteSize (),
2033
- m_process.GetByteOrder (),
2034
- m_process.GetAddressByteSize ());
2035
- ValueObjectSP valobj_sp (ValueObject::CreateValueObjectFromData (
2036
- " _" , data, m_process, payload_type));
2037
- if (!valobj_sp)
2038
- return false ;
2039
-
2040
- if (!GetDynamicTypeAndAddress (*valobj_sp, use_dynamic, class_type_or_name,
2041
- address, value_type))
2042
- return false ;
2043
-
2044
- address.SetRawAddress (old_box_value);
2045
- return true ;
2046
- } else if (type_info.AllSet (eTypeIsSwift | eTypeIsProtocol)) {
2026
+ if (type_info.AllSet (eTypeIsSwift) &&
2027
+ type_info.AnySet (eTypeIsClass | eTypeIsProtocol)) {
2047
2028
ExecutionContext exe_ctx = in_value.GetExecutionContextRef ();
2048
2029
ValueObjectSP valobj_sp = ValueObjectMemory::Create (
2049
2030
exe_ctx.GetBestExecutionContextScope (), " _" , box_value, payload_type);
0 commit comments