We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14e9a01 commit bdfcc60Copy full SHA for bdfcc60
lib/SILOptimizer/Utils/OwnershipOptUtils.cpp
@@ -1632,5 +1632,9 @@ createExtendedNestedBorrowScope(SILPhiArgument *newPhi) {
1632
// assumes that this API will eventually be called for all such new phis until
1633
// OSSA is fully valid.
1634
bool swift::createBorrowScopeForPhiOperands(SILPhiArgument *newPhi) {
1635
+ if (newPhi->getOwnershipKind() != OwnershipKind::Guaranteed
1636
+ && newPhi->getOwnershipKind() != OwnershipKind::None) {
1637
+ return false;
1638
+ }
1639
return GuaranteedPhiBorrowFixup().createExtendedNestedBorrowScope(newPhi);
1640
}
0 commit comments