@@ -177,7 +177,7 @@ void BorrowingOperand::visitLocalEndScopeInstructions(
177
177
switch (kind) {
178
178
case BorrowingOperandKind::BeginBorrow:
179
179
for (auto *use : cast<BeginBorrowInst>(op->getUser ())->getUses ()) {
180
- if (use->isConsumingUse ()) {
180
+ if (use->isLifetimeEnding ()) {
181
181
func (use);
182
182
}
183
183
}
@@ -248,7 +248,7 @@ void BorrowingOperand::visitUserResultConsumingUses(
248
248
if (!ti) {
249
249
for (SILValue result : op->getUser ()->getResults ()) {
250
250
for (auto *use : result->getUses ()) {
251
- if (use->isConsumingUse ()) {
251
+ if (use->isLifetimeEnding ()) {
252
252
visitor (use);
253
253
}
254
254
}
@@ -259,7 +259,7 @@ void BorrowingOperand::visitUserResultConsumingUses(
259
259
for (auto *succBlock : ti->getSuccessorBlocks ()) {
260
260
auto *arg = succBlock->getArgument (op->getOperandNumber ());
261
261
for (auto *use : arg->getUses ()) {
262
- if (use->isConsumingUse ()) {
262
+ if (use->isLifetimeEnding ()) {
263
263
visitor (use);
264
264
}
265
265
}
@@ -311,8 +311,8 @@ void BorrowedValue::getLocalScopeEndingInstructions(
311
311
case BorrowedValueKind::LoadBorrow:
312
312
case BorrowedValueKind::Phi:
313
313
for (auto *use : value->getUses ()) {
314
- if (use->isConsumingUse ()) {
315
- scopeEndingInsts.push_back (use->getUser ());
314
+ if (use->isLifetimeEnding ()) {
315
+ scopeEndingInsts.push_back (use->getUser ());
316
316
}
317
317
}
318
318
return ;
@@ -330,7 +330,7 @@ void BorrowedValue::visitLocalScopeEndingUses(
330
330
case BorrowedValueKind::BeginBorrow:
331
331
case BorrowedValueKind::Phi:
332
332
for (auto *use : value->getUses ()) {
333
- if (use->isConsumingUse ()) {
333
+ if (use->isLifetimeEnding ()) {
334
334
visitor (use);
335
335
}
336
336
}
@@ -385,7 +385,7 @@ bool BorrowedValue::visitLocalScopeTransitiveEndingUses(
385
385
SmallVector<Operand *, 32 > worklist;
386
386
SmallPtrSet<Operand *, 16 > beenInWorklist;
387
387
for (auto *use : value->getUses ()) {
388
- if (!use->isConsumingUse ())
388
+ if (!use->isLifetimeEnding ())
389
389
continue ;
390
390
worklist.push_back (use);
391
391
beenInWorklist.insert (use);
@@ -394,7 +394,7 @@ bool BorrowedValue::visitLocalScopeTransitiveEndingUses(
394
394
bool foundError = false ;
395
395
while (!worklist.empty ()) {
396
396
auto *op = worklist.pop_back_val ();
397
- assert (op->isConsumingUse () && " Expected only consuming uses" );
397
+ assert (op->isLifetimeEnding () && " Expected only consuming uses" );
398
398
399
399
// See if we have a borrow scope operand. If we do not, then we know we are
400
400
// a final consumer of our borrow scope introducer. Visit it and continue.
@@ -406,7 +406,7 @@ bool BorrowedValue::visitLocalScopeTransitiveEndingUses(
406
406
407
407
scopeOperand->visitConsumingUsesOfBorrowIntroducingUserResults (
408
408
[&](Operand *op) {
409
- assert (op->isConsumingUse () && " Expected only consuming uses" );
409
+ assert (op->isLifetimeEnding () && " Expected only consuming uses" );
410
410
// Make sure we haven't visited this consuming operand yet. If we
411
411
// have, signal an error and bail without re-visiting the operand.
412
412
if (!beenInWorklist.insert (op).second ) {
0 commit comments