Skip to content

[move-function] Convert an assert into an early exit. #40508

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

gottesmm
Copy link
Contributor

This assert was making sure we never saw a reborrow since they shouldn't occur
in Raw SIL. Some people were reporting that they /are/ hitting this assert, so I
am converting it into an early exit + skip analyzing an address. This will
prevent the assertion and also will fulfill the same purpose as the original,
not performing the move checking.

This will still result in correctness since if we skip as a move marker
instruction as a result of us skipping processing an address, the pass will emit
a compile time diagnostic saying the checker wasn't able to understand the given
code. So not the best, but at least if this hits a move itself we will be ok.

This assert was making sure we never saw a reborrow since they shouldn't occur
in Raw SIL. Some people were reporting that they /are/ hitting this assert, so I
am converting it into an early exit + skip analyzing an address. This will
prevent the assertion and also will fulfill the same purpose as the original,
not performing the move checking.

This will still result in correctness since if we skip as a move marker
instruction as a result of us skipping processing an address, the pass will emit
a compile time diagnostic saying the checker wasn't able to understand the given
code. So not the best, but at least if this hits a move itself we will be ok.
@gottesmm
Copy link
Contributor Author

@swift-ci test

@gottesmm gottesmm merged commit f2a416e into swiftlang:main Dec 11, 2021
@gottesmm gottesmm deleted the pr-51f6aede629e2aa705d53c4909bf5c4aae7dd701 branch December 11, 2021 01:36
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