From ddd7581c7331fe582dee2fef05585840a6f9023f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 23 Nov 2008 08:00:11 +0000 Subject: Make JIT::runFunction handle functions with non-C calling conventions. llvm-svn: 59904 --- llvm/lib/ExecutionEngine/JIT/JIT.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/ExecutionEngine') diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/llvm/lib/ExecutionEngine/JIT/JIT.cpp index 83923a2b8e3..41b3ebcc6db 100644 --- a/llvm/lib/ExecutionEngine/JIT/JIT.cpp +++ b/llvm/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. -- cgit v1.2.3