Skip to content

Commit 7220c40

Browse files
varungandhi-appleetcwilde
authored andcommitted
Use additional musttail checking only in debug builds.
1 parent bdad919 commit 7220c40

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/IR/Verifier.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3437,6 +3437,7 @@ cl::init(false), cl::desc("Check that tail calls from swifttailcc functions to"
34373437

34383438
void Verifier::verifyMustTailCall(CallInst &CI) {
34393439
if (!CI.isMustTailCall()) {
3440+
#ifndef NDEBUG
34403441
if (EnableSwiftTailCCMustTailCheck &&
34413442
CI.getCallingConv() == CallingConv::SwiftTail &&
34423443
CI.getCaller()->getCallingConv() == CallingConv::SwiftTail &&
@@ -3445,6 +3446,7 @@ void Verifier::verifyMustTailCall(CallInst &CI) {
34453446
false, "tail call from swifttail->swiftail should be marked musttail",
34463447
&CI);
34473448
}
3449+
#endif
34483450
return;
34493451
}
34503452

0 commit comments

Comments
 (0)