Skip to content

[lldb] Correct fallback condition in GetChildCompilerTypeAtIndex #2230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2264,7 +2264,8 @@ CompilerType TypeSystemSwiftTypeRef::GetChildCompilerTypeAtIndex(
// Because the API deals out an index into a list of children we
// can't mix&match between the two typesystems if there is such a
// divergence. We'll need to replace all calls at once.
if (m_swift_ast_context->GetNumFields(ReconstructType(type)) <
if (m_swift_ast_context->GetNumChildren(ReconstructType(type),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is ReconstructType needed here? Why can't this call be passed type directly.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type is an opaque pointer in TypeSystemSwiftTypeRef (a mangled name). If we want something to pass to SwiftASTContext we need to convert it to an AST type first.

omit_empty_base_classes, exe_ctx) <
runtime->GetNumChildren({this, type}, valobj).getValueOr(0))
return fallback();

Expand Down