Skip to content

[silgen] Rename forTrivialObjectRValue -> forObjectRValueWithoutOwnership and change a bunch of forUnmanaged to use this API #67780

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

@gottesmm gottesmm commented Aug 7, 2023

I am in the process of attempting to embed a bit into ManagedValue to say if a value is formal access scoped or lexical access scoped. As part of this, I need to get rid of the API forUnmanaged value since it is a way in SILGen that people have historically used to create both lexical and formal access scoped borrowed values. This also means I need to cleanup other usages of forUnmanaged value as well. As part of that in this PR, I am converting a bunch of cases where forUnmanaged was used with values that did not have ownership to instead use forObjectRValueWithoutOwnership.

…ship.

The reason to do this rename is that this is also used for objects that while
non-trivial have .none ownership. Example: enum instance without a case.
@gottesmm
Copy link
Contributor Author

gottesmm commented Aug 7, 2023

@swift-ci test

@gottesmm gottesmm merged commit 85e38af into swiftlang:main Aug 8, 2023
@gottesmm gottesmm deleted the pr-d9b586775f6ea84fe9868857eb8dd2eeaeb39f6f branch August 8, 2023 16:58
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.

1 participant