Skip to content
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

[6.1] Fix swift::areUsesWithinValueLifetime for guaranteed values #79091

Open
wants to merge 1 commit into
base: release/6.1
Choose a base branch
from

Conversation

meg-gupta
Copy link
Contributor

@meg-gupta meg-gupta commented Jan 31, 2025

Explanation: To find if all the uses are within a guaranteed value, we should find all borrow introducers.
swift::findOwnershipReferenceAggregate looks only through forwarding operations with single operands.
For simplicity, continue using swift::findOwnershipReferenceAggregate, but return false when it does not find a borrow introducer.
Scope: Regression from #78616
Original PRs: #79089
Risk: Low. Adds bailout and prevents a compiler crash
Testing: swift ci testing
Reviewers: @nate-chandler

To find if all the uses are within a guaranteed value, we should find all borrow introducers.

swift::findOwnershipReferenceAggregate looks only through forwarding operations with single operands.

For simplicity, continue using swift::findOwnershipReferenceAggregate, but return false when it does
not find a borrow introducer.
@meg-gupta
Copy link
Contributor Author

@swift-ci test

@meg-gupta meg-gupta changed the title Fix swift::areUsesWithinValueLifetime for guaranteed values [6.1] Fix swift::areUsesWithinValueLifetime for guaranteed values Jan 31, 2025
@meg-gupta meg-gupta marked this pull request as ready for review January 31, 2025 23:26
@meg-gupta meg-gupta requested a review from a team as a code owner January 31, 2025 23:26
@meg-gupta
Copy link
Contributor Author

@swift-ci test

@meg-gupta meg-gupta enabled auto-merge February 1, 2025 00:32
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