Skip to content

[AST] Consolidate Obj-C types on ASTContext #28128

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
merged 3 commits into from
Nov 7, 2019

Conversation

hamishknight
Copy link
Contributor

This PR moves the getNSObjectType and getObjCSelectorType methods from TypeChecker onto ASTContext. In addition, it moves the FOR_KNOWN_FOUNDATION_TYPES macro into a separate KnownObjCTypes.def file to define each of the Obj-C type decls we want to have access to.

Lastly, in the spirit of #27195, it defines variants of the getXXXDecl accessors that return the types.

This commit moves the getNSObjectType and
getObjCSelectorType methods from TypeChecker
onto ASTContext. In addition, it moves the
FOR_KNOWN_FOUNDATION_TYPES macro into a separate
file to define each of the Obj-C type decls
we want to have access to.
@hamishknight hamishknight requested a review from beccadax November 7, 2019 16:40
@hamishknight
Copy link
Contributor Author

@swift-ci please smoke test

@hamishknight hamishknight merged commit 1a81074 into swiftlang:master Nov 7, 2019
@hamishknight hamishknight deleted the known-objc-types branch November 7, 2019 20:41
Copy link
Contributor

@beccadax beccadax left a comment

Choose a reason for hiding this comment

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

Nice cleanup!

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.

3 participants