Skip to content

Commit f7591f1

Browse files
committed
[FuzzMutate] Match the callee's and callsite's calling conventions.
1 parent 5a1edf0 commit f7591f1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/FuzzMutate/IRMutator.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ void InsertFunctionStrategy::mutate(BasicBlock &BB, RandomIRBuilder &IB) {
390390
BasicBlock::iterator InsertPt) {
391391
StringRef Name = isRetVoid ? nullptr : "C";
392392
CallInst *Call = CallInst::Create(FTy, F, Srcs, Name, InsertPt);
393+
Call->setCallingConv(F->getCallingConv());
393394
// Don't return this call inst if it return void as it can't be sinked.
394395
return isRetVoid ? nullptr : Call;
395396
};

0 commit comments

Comments
 (0)