Skip to content

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

Merged
hamishknight merged 3 commits intoswiftlang:masterfrom
hamishknight:known-objc-types
Nov 7, 2019
Merged

[AST] Consolidate Obj-C types on ASTContext#28128
hamishknight merged 3 commits intoswiftlang:masterfrom
hamishknight:known-objc-types

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