Skip to content

Commit 2357893

Browse files
committed
[lldb] Correct fallback condition in GetChildCompilerTypeAtIndex
(cherry picked from commit 41ab113)
1 parent 07a27ea commit 2357893

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
@@ -2261,7 +2261,8 @@ CompilerType TypeSystemSwiftTypeRef::GetChildCompilerTypeAtIndex(
22612261
// Because the API deals out an index into a list of children we
22622262
// can't mix&match between the two typesystems if there is such a
22632263
// divergence. We'll need to replace all calls at once.
2264-
if (m_swift_ast_context->GetNumFields(ReconstructType(type)) <
2264+
if (m_swift_ast_context->GetNumChildren(ReconstructType(type),
2265+
omit_empty_base_classes, exe_ctx) <
22652266
runtime->GetNumChildren({this, type}, valobj).getValueOr(0))
22662267
return fallback();
22672268

0 commit comments

Comments
 (0)