Skip to content

Commit 43b20ca

Browse files
committed
Remove special case for MoveOnlyWrapperToCopyableValueInst and MoveOnlyWrapperToCopyableBoxInst
1 parent a332422 commit 43b20ca

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

lib/SIL/Utils/OwnershipUtils.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,13 +1386,6 @@ ValueOwnershipKind ForwardingOperand::getForwardingOwnershipKind() const {
13861386
return ofti->getForwardingOwnershipKind();
13871387
}
13881388

1389-
if (auto *move = dyn_cast<MoveOnlyWrapperToCopyableValueInst>(user)) {
1390-
return move->getForwardingOwnershipKind();
1391-
}
1392-
1393-
if (auto *move = dyn_cast<MoveOnlyWrapperToCopyableBoxInst>(user))
1394-
return move->getForwardingOwnershipKind();
1395-
13961389
llvm_unreachable("Unhandled forwarding inst?!");
13971390
}
13981391

@@ -1727,9 +1720,7 @@ bool swift::visitForwardedGuaranteedOperands(
17271720
if (isa<FirstArgOwnershipForwardingSingleValueInst>(inst) ||
17281721
isa<OwnershipForwardingConversionInst>(inst) ||
17291722
isa<OwnershipForwardingSelectEnumInstBase>(inst) ||
1730-
isa<OwnershipForwardingMultipleValueInstruction>(inst) ||
1731-
isa<MoveOnlyWrapperToCopyableValueInst>(inst) ||
1732-
isa<CopyableToMoveOnlyWrapperValueInst>(inst)) {
1723+
isa<OwnershipForwardingMultipleValueInstruction>(inst)) {
17331724
assert(!isa<SingleValueInstruction>(inst)
17341725
|| !BorrowedValue(cast<SingleValueInstruction>(inst))
17351726
&& "forwarded operand cannot begin a borrow scope");

0 commit comments

Comments
 (0)