@@ -177,7 +177,7 @@ void BorrowingOperand::visitLocalEndScopeInstructions(
177177 switch (kind) {
178178 case BorrowingOperandKind::BeginBorrow:
179179 for (auto *use : cast<BeginBorrowInst>(op->getUser ())->getUses ()) {
180- if (use->isConsumingUse ()) {
180+ if (use->isLifetimeEnding ()) {
181181 func (use);
182182 }
183183 }
@@ -248,7 +248,7 @@ void BorrowingOperand::visitUserResultConsumingUses(
248248 if (!ti) {
249249 for (SILValue result : op->getUser ()->getResults ()) {
250250 for (auto *use : result->getUses ()) {
251- if (use->isConsumingUse ()) {
251+ if (use->isLifetimeEnding ()) {
252252 visitor (use);
253253 }
254254 }
@@ -259,7 +259,7 @@ void BorrowingOperand::visitUserResultConsumingUses(
259259 for (auto *succBlock : ti->getSuccessorBlocks ()) {
260260 auto *arg = succBlock->getArgument (op->getOperandNumber ());
261261 for (auto *use : arg->getUses ()) {
262- if (use->isConsumingUse ()) {
262+ if (use->isLifetimeEnding ()) {
263263 visitor (use);
264264 }
265265 }
@@ -311,8 +311,8 @@ void BorrowedValue::getLocalScopeEndingInstructions(
311311 case BorrowedValueKind::LoadBorrow:
312312 case BorrowedValueKind::Phi:
313313 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 ());
316316 }
317317 }
318318 return ;
@@ -330,7 +330,7 @@ void BorrowedValue::visitLocalScopeEndingUses(
330330 case BorrowedValueKind::BeginBorrow:
331331 case BorrowedValueKind::Phi:
332332 for (auto *use : value->getUses ()) {
333- if (use->isConsumingUse ()) {
333+ if (use->isLifetimeEnding ()) {
334334 visitor (use);
335335 }
336336 }
@@ -385,7 +385,7 @@ bool BorrowedValue::visitLocalScopeTransitiveEndingUses(
385385 SmallVector<Operand *, 32 > worklist;
386386 SmallPtrSet<Operand *, 16 > beenInWorklist;
387387 for (auto *use : value->getUses ()) {
388- if (!use->isConsumingUse ())
388+ if (!use->isLifetimeEnding ())
389389 continue ;
390390 worklist.push_back (use);
391391 beenInWorklist.insert (use);
@@ -394,7 +394,7 @@ bool BorrowedValue::visitLocalScopeTransitiveEndingUses(
394394 bool foundError = false ;
395395 while (!worklist.empty ()) {
396396 auto *op = worklist.pop_back_val ();
397- assert (op->isConsumingUse () && " Expected only consuming uses" );
397+ assert (op->isLifetimeEnding () && " Expected only consuming uses" );
398398
399399 // See if we have a borrow scope operand. If we do not, then we know we are
400400 // a final consumer of our borrow scope introducer. Visit it and continue.
@@ -406,7 +406,7 @@ bool BorrowedValue::visitLocalScopeTransitiveEndingUses(
406406
407407 scopeOperand->visitConsumingUsesOfBorrowIntroducingUserResults (
408408 [&](Operand *op) {
409- assert (op->isConsumingUse () && " Expected only consuming uses" );
409+ assert (op->isLifetimeEnding () && " Expected only consuming uses" );
410410 // Make sure we haven't visited this consuming operand yet. If we
411411 // have, signal an error and bail without re-visiting the operand.
412412 if (!beenInWorklist.insert (op).second ) {
0 commit comments