Skip to content

Commit ea10281

Browse files
committed
[CanonGuaranteedValue] Don't insert fwd destroy.
When rewriting forwards, don't fix the lifetime which results in spurious lifetime ends.
1 parent e5e1481 commit ea10281

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SILOptimizer/Utils/CanonicalizeBorrowScope.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ class RewriteOuterBorrowUses {
601601
}
602602
// If it's not already dead, update this operand bypassing any copies.
603603
SILValue innerValue = use->get();
604-
if (scope.getDeleter().deleteIfDead(user)) {
604+
if (scope.getDeleter().deleteIfDead(user, /*fixLifetime=*/false)) {
605605
LLVM_DEBUG(llvm::dbgs() << " Deleted " << *user);
606606
} else {
607607
use->set(scope.findDefInBorrowScope(use->get()));

0 commit comments

Comments
 (0)