Skip to content

Commit 5c33459

Browse files
committed
Update OperandOwnership of ReturnInst
1 parent a09e258 commit 5c33459

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/SIL/IR/OperandOwnership.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,9 @@ OperandOwnership OperandOwnershipClassifier::visitYieldInst(YieldInst *i) {
610610
OperandOwnership OperandOwnershipClassifier::visitReturnInst(ReturnInst *i) {
611611
switch (i->getOwnershipKind()) {
612612
case OwnershipKind::Any:
613-
case OwnershipKind::Guaranteed:
614613
llvm_unreachable("invalid value ownership");
614+
case OwnershipKind::Guaranteed:
615+
return OperandOwnership::GuaranteedForwarding;
615616
case OwnershipKind::None:
616617
return OperandOwnership::TrivialUse;
617618
case OwnershipKind::Unowned:

0 commit comments

Comments
 (0)