Skip to content

Commit 3331e29

Browse files
committed
fallback to SwiftASTContext for unsupported cases
1 parent 79f7869 commit 3331e29

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2077,10 +2077,14 @@ TypeSystemSwiftTypeRef::GetNumChildren(opaque_compiler_type_t type,
20772077
// TODO: which of these should be logged on failure?
20782078
if (auto *exe_scope = exe_ctx->GetBestExecutionContextScope())
20792079
if (auto *runtime =
2080-
SwiftLanguageRuntime::Get(exe_scope->CalculateProcess()))
2080+
SwiftLanguageRuntime::Get(exe_scope->CalculateProcess())) {
20812081
if (auto num_children =
20822082
runtime->GetNumChildren(GetCanonicalType(type), nullptr))
20832083
return *num_children;
2084+
else
2085+
return m_swift_ast_context->GetNumChildren(
2086+
ReconstructType(type), omit_empty_base_classes, exe_ctx);
2087+
}
20842088

20852089
return 0;
20862090
};

0 commit comments

Comments
 (0)