-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Revert "Revert "[cxx-interop] Import custom NS_OPTIONS
correctly""
#68546
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
@swift-ci please smoke test |
0e32341
to
829b578
Compare
@swift-ci please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @DougGregor should look over this. But this LGTM. Moving getTypeDefForCXXCFOptionsDefinition
into ASTContext
is the fix we all discussed.
lib/AST/ASTContext.cpp
Outdated
@@ -5732,6 +5732,48 @@ ASTContext::getClangTypeForIRGen(Type ty) { | |||
return getClangTypeConverter().convert(ty).getTypePtrOrNull(); | |||
} | |||
|
|||
const clang::TypedefType *ASTContext::getTypedefForCXXCFOptionsDefinition( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer not to have Clang-specific APIs on ASTContext
. Can we keep this within the ClangImporter, e.g., by making it a static method there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, I made it a static method of ClangImporter
…ailable This makes sure that we can emit a pch from a C++ header that uses `CF_OPTIONS`. rdar://112225263
829b578
to
6a2f10a
Compare
@swift-ci please smoke test |
@swift-ci please smoke test macOS |
@swift-ci please smoke test Linux |
This re-lands #67865 after it got reverted in #68435 due to a regression when emitting a pch file.
rdar://112225263