Skip to content

Commit 3bc6497

Browse files
committed
Teach TransferNonSendable that not all Error BB's have arguments
1 parent 3173a3d commit 3bc6497

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/SILOptimizer/Mandatory/TransferNonSendable.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,8 @@ class PartitionOpTranslator {
647647

648648
if (auto tryApplyInst = dyn_cast<TryApplyInst>(inst)) {
649649
foundResults.emplace_back(tryApplyInst->getNormalBB()->getArgument(0));
650-
foundResults.emplace_back(tryApplyInst->getErrorBB()->getArgument(0));
650+
if (tryApplyInst->getErrorBB()->getNumArguments() > 0)
651+
foundResults.emplace_back(tryApplyInst->getErrorBB()->getArgument(0));
651652
return;
652653
}
653654

0 commit comments

Comments
 (0)