Skip to content

Sema: Diagnose @backDeployed functions with missing bodies in swiftinterfaces #78414

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 3, 2025

Conversation

tshortli
Copy link
Contributor

@tshortli tshortli commented Jan 2, 2025

A @backDeployed function printed in a .swiftinterface must have a function body so that SILGen can emit a fallback copy to call when the back deployed function is unavailable. Previously, the compiler would crash in SILGen when compiling an interface containing a back deployed function without a body.

This is a second attempt of #78327, which was reverted with #78327.

Resolves rdar://141593108.

@tshortli
Copy link
Contributor Author

tshortli commented Jan 2, 2025

@swift-ci please test

@tshortli
Copy link
Contributor Author

tshortli commented Jan 2, 2025

@swift-ci please build toolchain macOS

…terfaces.

A `@backDeployed` function printed in a `.swiftinterface` must have a function
body so that SILGen can emit a fallback copy to call when the back deployed
function is unavailable. Previously, the compiler would crash in SILGen when
compiling an interface containing a back deployed function without a body.

Resolves rdar://141593108.
@tshortli tshortli force-pushed the back-deployed-without-body-redux branch from f8d949a to 7ea778f Compare January 3, 2025 17:15
@tshortli
Copy link
Contributor Author

tshortli commented Jan 3, 2025

@swift-ci please test

@tshortli
Copy link
Contributor Author

tshortli commented Jan 3, 2025

@swift-ci please build toolchain macOS

@tshortli tshortli enabled auto-merge January 3, 2025 22:17
@tshortli tshortli merged commit 2c52f05 into swiftlang:main Jan 3, 2025
5 of 6 checks passed
@tshortli tshortli deleted the back-deployed-without-body-redux branch January 7, 2025 18:22
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