Skip to content

Commit 5ccf3a8

Browse files
committed
SILVerifier: don't enforce that there must be an unreachable after a no-return apply.
This condition does not hold after each pass. It's only the case after running some cleanup-passes. This verifier condition makes it impossible to bisect the optimization passes.
1 parent a19ae5c commit 5ccf3a8

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

lib/SIL/Verifier/SILVerifier.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,14 +1504,6 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
15041504
"cannot call coroutine with normal apply");
15051505
require(!calleeConv.funcTy->isAsync() || AI->getFunction()->isAsync(),
15061506
"cannot call an async function from a non async function");
1507-
1508-
// Check that if the apply is of a noreturn callee, make sure that an
1509-
// unreachable is the next instruction.
1510-
if (AI->getModule().getStage() == SILStage::Raw ||
1511-
!AI->isCalleeNoReturn())
1512-
return;
1513-
require(isa<UnreachableInst>(std::next(SILBasicBlock::iterator(AI))),
1514-
"No return apply without an unreachable as a next instruction.");
15151507
}
15161508

15171509
void checkTryApplyInst(TryApplyInst *AI) {

0 commit comments

Comments
 (0)