Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions llvm/lib/IR/Verifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3580,7 +3580,8 @@ void Verifier::verifyMustTailCall(CallInst &CI) {
AttributeList CallerAttrs = F->getAttributes();
AttributeList CalleeAttrs = CI.getAttributes();
if (CI.getCallingConv() == CallingConv::SwiftTail ||
CI.getCallingConv() == CallingConv::Tail) {
CI.getCallingConv() == CallingConv::Tail ||
CI.getCallingConv() == CallingConv::OCaml) {
StringRef CCName =
CI.getCallingConv() == CallingConv::Tail ? "tailcc" : "swifttailcc";

Expand All @@ -3602,9 +3603,6 @@ void Verifier::verifyMustTailCall(CallInst &CI) {
return;
}

// - The caller and callee prototypes must match. Pointer types of
// parameters or return types may differ in pointee type, but not
// address space.
if (!CI.getCalledFunction() || !CI.getCalledFunction()->isIntrinsic()) {
Check(CallerTy->getNumParams() == CalleeTy->getNumParams(),
"cannot guarantee tail call due to mismatched parameter counts", &CI);
Expand Down