Skip to content

[Clang][driver][cc1] Fix handling of of C++20 modules in ObjectiveC++ #6134

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 26, 2023

Conversation

Bigcheese
Copy link

Unfortunately, ObjectiveC++ does not currently support C++20 modules. This is because ObjectiveC requires Local Submodule Visibility in practice, which is not compatible with C++20 modules. Given our options are to either drop ObjectiveC compatibility, or C++20 modules compatibility, we currently choose to disable C++20 modules to allow using other C++20 features in ObjectiveC++20 mode.

This patch also allows enabling LSV and C++20 modules in ObjectiveC++20 mode for the few cases it does work. It adds errors for incompatible configurations.

cherry-pick from next: #6015

Unfortunately, ObjectiveC++ does not currently support C++20 modules.
This is because ObjectiveC requires Local Submodule Visibility in
practice, which is not compatible with C++20 modules. Given our
options are to either drop ObjectiveC compatibility, or C++20 modules
compatibility, we currently choose to disable C++20 modules to allow
using other C++20 features in ObjectiveC++20 mode.

This patch also allows enabling LSV and C++20 modules in
ObjectiveC++20 mode for the few cases it does work. It adds errors for
incompatible configurations.
@Bigcheese
Copy link
Author

@swift-ci test

@Bigcheese Bigcheese merged commit 6a4233c into swiftlang:stable/20221013 Jan 26, 2023
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.

1 participant