Skip to content

[5.6] [ShrinkBorrowScope] Fixed assert. #40739

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

Conversation

nate-chandler
Copy link
Contributor

Previously, it was asserted that hoisting over a terminator succeeded (because it is previously checked that it can be done). That was erroneously done by putting the call to hoist within an invocation of the assert macro. The result was that in release builds, the call was not made. Here, that is fixed by just calling the hoist function and, in debug builds, asserting its return.

rdar://86809882

Previously, it was asserted that hoisting over a terminator succeeded
(because it is previously checked that it can be done).  That was
erroneously done by putting the call to hoist within an invocation of
the assert macro.  The result was that in release builds, the call was
not made.  Here, that is fixed by just calling the hoist function and,
in debug builds, asserting its return.

rdar://86809882
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler
Copy link
Contributor Author

@swift-ci please clean test windows platform

Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. Not sure if you want to merge the cleaned-up version instead to reduce future merge conflicts... maybe not an issue

@nate-chandler nate-chandler merged commit bdafd9b into swiftlang:release/5.6 Jan 11, 2022
@nate-chandler nate-chandler deleted the cherrypick/copy-propagation/fixed-assert/release/5.6 branch January 11, 2022 19:48
@nate-chandler
Copy link
Contributor Author

Will cherry-pick the NFC cleanup commit in a subsequent PR.

@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.6 labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants