Skip to content

[gardening] Copy edit a comment. #11754

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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions lib/SILGen/SILGenExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1254,9 +1254,11 @@ RValue SILGenFunction::emitRValueForPropertyLoad(
(!C.isImmediatePlusZeroOk() &&
!(C.isGuaranteedPlusZeroOk() && isGuaranteedValid))) {
// If we have an abstraction change or if we have to produce a result at
// +1, then emit a RetainValue. If we know that our base will stay alive,
// we can emit at +0 for a guaranteed consumer. Otherwise, since we do not
// have enough information, we can only emit at +0 for immediate clients.
// +1, then copy the value. If we know that our base will stay alive for
// the entire usage of this value, we can borrow the value at +0 for a
// guaranteed consumer. Otherwise, since we do not have enough information
// to know if the base's lifetime last's as long as our use of the access,
// we can only emit at +0 for immediate clients.
result = result.copyUnmanaged(*this, loc);
}
} else {
Expand Down