Skip to content

SILGen: Don't call _diagnoseUnavailableCodeReached() from already unreachable functions #68874

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

Conversation

tshortli
Copy link
Contributor

We must avoid emitting applies of _diagnoseUnavailableCodeReached() in function bodies that are already marked unreachable since there isn't a valid insertion point once an unreachable instruction has been emitted. A function body may be marked unreachable if, for example, the parameters of the function are uninhabited.

Resolves rdar://116246677

…eachable functions.

We must avoid emitting applies of `_diagnoseUnavailableCodeReached()` in
function bodies that are already marked unreachable since there isn't a valid
insertion point once an `unreachable` instruction has been emitted. A function
body may be marked unreachable if, for example, the parameters of the function
are uninhabited.

Resolves rdar://116246677
@tshortli
Copy link
Contributor Author

@swift-ci please smoke test

@tshortli tshortli merged commit ed8cbea into swiftlang:main Sep 29, 2023
@tshortli tshortli deleted the unavailable-stub-takes-uninhabited-params branch September 29, 2023 23:03
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