Skip to content

[closure-lifetime-fixup] When emitting a load_borrow, make sure to em… #20079

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

gottesmm
Copy link
Contributor

…it the end_borrow for it as well.

In this commit I added a more convenient API for doing this sort of operation.
Specifically: SILBuilder::emitScopedBorrowOperation. This performs either a
load_borrow or begin_borrow, then calls a user provided closure, and finally
inserts the end_borrow after the scope has closed.

rdar://43398898

@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm
Copy link
Contributor Author

Found a small typo...

…it the end_borrow for it as well.

In this commit I added a more convenient API for doing this sort of operation.
Specifically: SILBuilder::emitScopedBorrowOperation. This performs either a
load_borrow or begin_borrow, then calls a user provided closure, and finally
inserts the end_borrow after the scope has closed.

rdar://43398898
@gottesmm gottesmm force-pushed the pr-b0fb5eb2f5151be44b6c9311c3d3fe015dc1fc5a branch from 6d0abbd to e4607a7 Compare October 26, 2018 18:11
@gottesmm
Copy link
Contributor Author

Ok. It is ready now @aschwaighofer

@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

3 similar comments
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm
Copy link
Contributor Author

I think this is a straight forward enough change to do post commit review. When this finishes I want to immediately start the (long) testing of enabling ownership on all the stdlib overlays.

@gottesmm gottesmm merged commit f44973f into swiftlang:master Oct 26, 2018
@gottesmm gottesmm deleted the pr-b0fb5eb2f5151be44b6c9311c3d3fe015dc1fc5a branch October 26, 2018 19:09
@aschwaighofer
Copy link
Contributor

LGTM

@gottesmm
Copy link
Contributor Author

Thanks!

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