Skip to content

ClangImporter: unify language standard selection (NFCI) #35280

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 1 commit into from
Jan 7, 2021

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Jan 6, 2021

This simply extracts the shared portion of the language version setup.
The state of the ObjC interop determines if we are in ObjectiveC or C
mode or ObjectiveC++ or C++ mode depending on C++ interop. However, if
Objective-C interop is enabled, we must enable ARC and set the ObjC
runtime version according to the target. This simply shares more of the
setup and is meant as a simplification for pairing the language version.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

This simply extracts the shared portion of the language version setup.
The state of the ObjC interop determines if we are in ObjectiveC or C
mode or ObjectiveC++ or C++ mode depending on C++ interop.  However, if
Objective-C interop is enabled, we must enable ARC and set the ObjC
runtime version according to the target.  This simply shares more of the
setup and is meant as a simplification for pairing the language version.
@compnerd
Copy link
Member Author

compnerd commented Jan 6, 2021

CC: @zoecarver @hlopko @martinboehme

@compnerd
Copy link
Member Author

compnerd commented Jan 6, 2021

@swift-ci please clean test

Copy link
Contributor

@zoecarver zoecarver left a comment

Choose a reason for hiding this comment

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

Thanks for the cleanup!

(I assume this is unrelated to the issue with tests failing on older MSVC compilers.)

@zoecarver zoecarver added the c++ interop Feature: Interoperability with C++ label Jan 6, 2021
@compnerd
Copy link
Member Author

compnerd commented Jan 6, 2021

This is just a cleanup. I wanted to synchronize the clang version and the Swift language version handling (which I have in a subsequent patch). I'll test that, but I suspect that it will resolve the issue on the newer MSVC toolchains.

@compnerd compnerd merged commit 597c4e8 into swiftlang:main Jan 7, 2021
@compnerd compnerd deleted the shared-language branch January 7, 2021 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants