Skip to content

[cxx-interop] Avoid swiftifying private and protected methods #82016

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
Jun 6, 2025

Conversation

Xazax-hun
Copy link
Contributor

The generated overloads do not get seralized and later on the compiler crashes due to the missing body of the SILFunction. This PR works this problem around by not generating these overloads. We plan to address the serialization issue later.

rdar://152181531

The generated overloads do not get seralized and later on the compiler
crashes due to the missing body of the SILFunction. This PR works this
problem around by not generating these overloads. We plan to address the
serialization issue later.

rdar://152181531
@Xazax-hun Xazax-hun force-pushed the gaborh/swiftify-private branch from ed1fe30 to 6eb7057 Compare June 6, 2025 10:13
@Xazax-hun
Copy link
Contributor Author

@swift-ci please smoke test

@Xazax-hun Xazax-hun merged commit 296726a into main Jun 6, 2025
3 checks passed
@Xazax-hun Xazax-hun deleted the gaborh/swiftify-private branch June 6, 2025 16:19
Xazax-hun added a commit that referenced this pull request Jun 9, 2025
Explanation: We do not serialize the private macro generated swift
method's bodies which crashes the compiler. This PR skips generating
swiftified overloads to these private/protected method to work around
the crash.
Issue: rdar://152181531
Risk: Low, the change is straightforward.
Testing: Regression test added.
Original PR: #82016
Reviewer: @hnrklssn
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