File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -289,18 +289,16 @@ bool OwnershipUseVisitor<Impl>::visitInnerBorrowScopeEnd(Operand *borrowEnd) {
289
289
290
290
return handleUsePoint (borrowEnd, UseLifetimeConstraint::NonLifetimeEnding);
291
291
}
292
- case OperandOwnership::DestroyingConsume: {
293
- // partial_apply [on_stack] can introduce borrowing operand and can have
294
- // destroy_value consumes.
295
- auto *pai = dyn_cast<PartialApplyInst>(borrowEnd->get ());
296
- // TODO: When we have ForwardingInstruction abstraction, walk the use-def
297
- // chain to ensure we have a partial_apply [on_stack] def.
298
- assert (pai && pai->isOnStack () ||
299
- ForwardingInstruction::get (
300
- cast<SingleValueInstruction>(borrowEnd->get ())));
292
+ case OperandOwnership::DestroyingConsume:
293
+ case OperandOwnership::ForwardingConsume: {
294
+ // partial_apply [on_stack] and mark_dependence [nonescaping] can introduce
295
+ // borrowing operand and can have destroy_value, return, or store consumes.
296
+ //
297
+ // TODO: When we have a C++ ForwardingUseDefWalker, walk the def-use
298
+ // chain to ensure we have a partial_apply [on_stack] or mark_dependence
299
+ // [nonescaping] def.
301
300
return handleUsePoint (borrowEnd, UseLifetimeConstraint::NonLifetimeEnding);
302
301
}
303
-
304
302
default :
305
303
llvm_unreachable (" expected borrow scope end" );
306
304
}
You can’t perform that action at this time.
0 commit comments