aboutsummaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/JIT/JIT.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ExecutionEngine/JIT/JIT.cpp')
-rw-r--r--lib/ExecutionEngine/JIT/JIT.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp
index 83923a2b8e..41b3ebcc6d 100644
--- a/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/lib/ExecutionEngine/JIT/JIT.cpp
@@ -446,6 +446,7 @@ GenericValue JIT::runFunction(Function *F,
CallInst *TheCall = CallInst::Create(F, Args.begin(), Args.end(),
"", StubBB);
+ TheCall->setCallingConv(F->getCallingConv());
TheCall->setTailCall();
if (TheCall->getType() != Type::VoidTy)
ReturnInst::Create(TheCall, StubBB); // Return result of the call.