diff --git a/lldb/source/Target/SwiftLanguageRuntime.cpp b/lldb/source/Target/SwiftLanguageRuntime.cpp index 4524f5661476f..ec3c64ad9c3b2 100644 --- a/lldb/source/Target/SwiftLanguageRuntime.cpp +++ b/lldb/source/Target/SwiftLanguageRuntime.cpp @@ -1983,6 +1983,13 @@ Value::ValueType SwiftLanguageRuntime::GetValueType( eTypeInstanceIsPointer)) return Value::eValueTypeLoadAddress; } + + if (static_type_flags.AllSet(eTypeIsSwift | eTypeIsPointer) && + static_type_flags.AllClear(eTypeIsGenericTypeParam)) { + // FIXME: This branch is not covered by any testcases in the test suite. + if (is_indirect_enum_case || static_type_flags.AllClear(eTypeIsBuiltIn)) + return Value::eValueTypeLoadAddress; + } } // Enabling this makes the inout_variables test hang.