diff --git a/llvm/lib/FuzzMutate/IRMutator.cpp b/llvm/lib/FuzzMutate/IRMutator.cpp index 7e28f58046b1f..d5535ee9aaf66 100644 --- a/llvm/lib/FuzzMutate/IRMutator.cpp +++ b/llvm/lib/FuzzMutate/IRMutator.cpp @@ -374,7 +374,8 @@ void InsertFunctionStrategy::mutate(BasicBlock &BB, RandomIRBuilder &IB) { return T->isMetadataTy() || T->isTokenTy(); }; if (!F || IsUnsupportedTy(F->getReturnType()) || - any_of(F->getFunctionType()->params(), IsUnsupportedTy)) { + any_of(F->getFunctionType()->params(), IsUnsupportedTy) || + !isCallableCC(F->getCallingConv())) { F = IB.createFunctionDeclaration(*M); }