Skip to content

[ownership] Change CanonicalOSSALifetime to use an InstModCallback. #37003

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 enables passes to use this as a utility that properly composes with how the
pass maintains its state. If an InstModCallback isn't passed in, we use the
default InstModCallback which should be cheap (always succeeding check for
nullptr + call inline default callback).


Should be NFC

@gottesmm
Copy link
Contributor Author

@swift-ci test

@gottesmm gottesmm requested a review from atrick April 21, 2021 23:11
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.

Ok. This makes an assumption that setUseValue cannot invalidate use iterators. Can you make sure the API specifies that invariant so no one violate it?

@gottesmm gottesmm force-pushed the pr-af8aa6d23b297a3ff4a3237f2dfe6fec12673023 branch 2 times, most recently from 91660a4 to 953bfb2 Compare April 22, 2021 03:56
@gottesmm
Copy link
Contributor Author

@swift-ci test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 953bfb29549e60110a18c9cf48f51e0c33136718

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 953bfb29549e60110a18c9cf48f51e0c33136718

This enables passes to use this as a utility that properly composes with how the
pass maintains its state. If an InstModCallback isn't passed in, we use the
default InstModCallback which should be cheap (always succeeding check for
nullptr + call inline default callback).
@gottesmm gottesmm force-pushed the pr-af8aa6d23b297a3ff4a3237f2dfe6fec12673023 branch from 953bfb2 to c3c2b84 Compare April 22, 2021 05:16
@gottesmm
Copy link
Contributor Author

@swift-ci test

@gottesmm gottesmm merged commit 71fd7f9 into swiftlang:main Apr 22, 2021
@gottesmm gottesmm deleted the pr-af8aa6d23b297a3ff4a3237f2dfe6fec12673023 branch April 22, 2021 14:11
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.

3 participants