Merge remote-tracking branch 'origin/main' into rebranch

This commit is contained in:
swift-ci
2021-08-16 11:33:58 -07:00
3 changed files with 44 additions and 2 deletions

View File

@@ -778,9 +778,15 @@ bool CanonicalizeBorrowScope::consolidateBorrowScope() {
bool CanonicalizeBorrowScope::canonicalizeFunctionArgument(
SILFunctionArgument *arg) {
BorrowedValue borrow(arg);
if (!borrow)
return false;
initBorrow(borrow);
LLVM_DEBUG(llvm::dbgs() << "*** Canonicalize Borrow: " << borrowedValue);
initBorrow(BorrowedValue(arg));
SWIFT_DEFER { liveness.clear(); };
RewriteInnerBorrowUses innerRewriter(*this);
beginVisitBorrowScopeUses(); // reset the def/use worklist