Skip to content

Commit 41f316f

Browse files
authored
Merge pull request #2230 from apple/lldb-Correct-fallback-condition-in-GetChildCompilerTypeAtIndex
[lldb] Correct fallback condition in GetChildCompilerTypeAtIndex
2 parents a01bdfb + 41ab113 commit 41f316f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2264,7 +2264,8 @@ CompilerType TypeSystemSwiftTypeRef::GetChildCompilerTypeAtIndex(
22642264
// Because the API deals out an index into a list of children we
22652265
// can't mix&match between the two typesystems if there is such a
22662266
// divergence. We'll need to replace all calls at once.
2267-
if (m_swift_ast_context->GetNumFields(ReconstructType(type)) <
2267+
if (m_swift_ast_context->GetNumChildren(ReconstructType(type),
2268+
omit_empty_base_classes, exe_ctx) <
22682269
runtime->GetNumChildren({this, type}, valobj).getValueOr(0))
22692270
return fallback();
22702271

0 commit comments

Comments
 (0)