-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[AST] Convert ASTContext::getSwiftName to a free function #65082
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
[AST] Convert ASTContext::getSwiftName to a free function #65082
Conversation
This helps lldb avoid creating ASTContexts (which can be costly), before they're really needed. |
The only state `getSwiftName` uses is its argument, and can be made a free function. Of note the inverse operation, `getKnownFoundationEntity`, is also a free function. This removes the requirement that callers have an `ASTContext` instance.
5df8173
to
fb524c0
Compare
@swift-ci smoke test |
swiftlang/llvm-project#6634 |
1 similar comment
swiftlang/llvm-project#6634 |
@swift-ci test macOS Platform |
@swift-ci test Linux Platform |
swiftlang/llvm-project#6634 |
swiftlang/llvm-project#6634 |
Is this change on |
Here's the cherry pick for main #65194 |
The only state
getSwiftName
uses is its argument, and can be made a free function. Of note, the inverse operation,getKnownFoundationEntity
, is also a free function. This removes the requirement that callers have anASTContext
instance.Cherry-pick of #65194.