File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ class ShrinkBorrowScope {
117
117
mayAccessPointer (instruction) || mayLoadWeakOrUnowned (instruction);
118
118
}
119
119
120
- bool canReplaceValueWithBorrowedValue (SILValue value) {
120
+ bool canReplaceValueWithBorrowee (SILValue value) {
121
121
while (true ) {
122
122
auto *instruction = value.getDefiningInstruction ();
123
123
if (!instruction)
@@ -145,7 +145,7 @@ class ShrinkBorrowScope {
145
145
if (users.contains (instruction)) {
146
146
if (auto *bbi = dyn_cast<BeginBorrowInst>(instruction)) {
147
147
if (bbi->isLexical () &&
148
- canReplaceValueWithBorrowedValue (bbi->getOperand ())) {
148
+ canReplaceValueWithBorrowee (bbi->getOperand ())) {
149
149
if (rewrite) {
150
150
auto borrowee = introducer->getOperand ();
151
151
bbi->setOperand (borrowee);
@@ -154,7 +154,7 @@ class ShrinkBorrowScope {
154
154
return true ;
155
155
}
156
156
} else if (auto *cvi = dyn_cast<CopyValueInst>(instruction)) {
157
- if (canReplaceValueWithBorrowedValue (cvi->getOperand ())) {
157
+ if (canReplaceValueWithBorrowee (cvi->getOperand ())) {
158
158
if (rewrite) {
159
159
auto borrowee = introducer->getOperand ();
160
160
cvi->setOperand (borrowee);
You can’t perform that action at this time.
0 commit comments