Skip to content

Conversation

gottesmm
Copy link
Contributor

This PR adds two more asserts that I am using to validate some assumptions in the pass before I fix it for the strong control equivalence issues in between copies.

…lues when promoting takes.

The key thing to note here is that when we are processing a take, we validate
that at all destroy points we have a fully available value. So we should never
hit this code path which is correct. This assert just makes the assumption
clearer in the small when reading code locally in handlePrimitiveValue.
…ve singular values if the underlying type is either trivial or we have a take.

The reason why this is true is that we will be inserting new copy_values for
each available value implying that we can never have such a singular value.

I also added two test cases that show that we have a singular value with the
trivial type and that works.
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test and merge

@swift-ci swift-ci merged commit 7004322 into swiftlang:master Nov 11, 2019
@gottesmm gottesmm deleted the pr-a5b32ece5ba488e8d35fdb4460bb3e64a1fc716e branch July 23, 2021 21:53
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.

2 participants