Skip to content

[lldb] Try GetTargetWP before GetSwiftASTContext (#6656) #6787

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

Conversation

kastiglione
Copy link

LookupClangType needs the Target instance, and it has used GetSwiftASTContext to get to the target. It does not need anything directly from the ASTContext. To avoid unnecessarily loading Swift ASTContexts from TypeSystemSwiftTypeRef, this change tries GetTargetWP first, and if that succeeds, then the call to GetSwiftASTContext can be avoided entirely.

(cherry-picked from commit 2e31fa3)

`LookupClangType` needs the `Target` instance, and it has used `GetSwiftASTContext` to get to the target. It does not need anything directly from the ASTContext. To avoid unnecessarily loading Swift ASTContexts from `TypeSystemSwiftTypeRef`, this change tries `GetTargetWP` first, and if that succeeds, then the call to `GetSwiftASTContext` can be avoided entirely.

(cherry-picked from commit 2e31fa3)
@kastiglione kastiglione merged commit 8f1b918 into next May 5, 2023
@kastiglione kastiglione deleted the dl/lldb-Try-GetTargetWP-before-GetSwiftASTContext-6656 branch May 5, 2023 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant