Skip to content

[lldb] Make use of target triple in TypeSystemSwiftTypeRef (#6692) #6790

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

Conversation

kastiglione
Copy link

Update TypeSystemSwiftTypeRef::GetTriple to make use of an available target.

With this change, GetNameImporter can work in more cases, since it only needs a
triple. And since GetNameImporter can be expected to return a ClangNameImporter
instance, the fallback to using Swift ASTContexts can be removed.

This eliminates another case of unnecessarily loading Swift ASTContexts, which incurs a
one time overhead that should only be paid when required.

Partial follow up to #6654

(cherry-picked from commit f097595)

Update `TypeSystemSwiftTypeRef::GetTriple` to make use of an available target.

With this change, `GetNameImporter` can work in more cases, since it only needs a 
triple. And since `GetNameImporter` can be expected to return a `ClangNameImporter` 
instance, the fallback to using Swift ASTContexts can be removed.

This eliminates another case of unnecessarily loading Swift ASTContexts, which incurs a 
one time overhead that should only be paid when required.

Partial follow up to #6654

(cherry-picked from commit f097595)
@kastiglione kastiglione merged commit 0df28a0 into next May 5, 2023
@kastiglione kastiglione deleted the dl/lldb-Make-use-of-target-triple-in-TypeSystemSwiftTypeRef-6692 branch May 5, 2023 17:19
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