Skip to content

[6.2][cxx-interop] Types exposed from ObjC modules should be behind a macro #83065

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

Open
wants to merge 1 commit into
base: release/6.2
Choose a base branch
from

Conversation

Xazax-hun
Copy link
Contributor

@Xazax-hun Xazax-hun commented Jul 15, 2025

Explanation: We the generated reverse interop headers to be valid C++, so every declaration coming from an Obj-C module should be behind an ifdef. Unfortunately, we do not always have this information but we do know that our frameworks contain Obj-C code. So this PR makes sure every entity coming from our frameworks are behind ifdef.
Issues: rdar://152836730
Original PRs: #83002
Risk: Low, the change is narrow and straightforward.
Testing: Added a compiler test.
Reviewers: @egorzhdan

@Xazax-hun Xazax-hun requested a review from a team as a code owner July 15, 2025 16:23
@Xazax-hun Xazax-hun added c++ interop Feature: Interoperability with C++ 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2 labels Jul 15, 2025
@Xazax-hun
Copy link
Contributor Author

@swift-ci please test

… macro

Explanation: We the generated reverse interop headers to be valid C++,
so every declaration coming from an Obj-C module should be behind an
ifdef. Unfortunately, we do not always have this information but we do
know that our frameworks contain Obj-C code. So this PR makes sure every
entity coming from our frameworks are behind ifdef.
Issues: rdar://152836730
Original PRs: swiftlang#83002
Risk: Low, the change is narrow and straightforward.
Testing: Added a compiler test.
Reviewers: @egorzhdan
@Xazax-hun Xazax-hun force-pushed the guard-more-objc-on-6.2 branch from a8130d8 to ab12392 Compare July 16, 2025 10:20
@Xazax-hun
Copy link
Contributor Author

@swift-ci please test

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++ 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant