diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp index 0559c53e6cf..cf4e14481b8 100644 --- a/lib/ExecutionEngine/JIT/JIT.cpp +++ b/lib/ExecutionEngine/JIT/JIT.cpp @@ -198,7 +198,8 @@ GenericValue JIT::runFunction(Function *F, Args.push_back(C); } - Value *TheCall = new CallInst(F, Args, "", StubBB); + CallInst *TheCall = new CallInst(F, Args, "", StubBB); + TheCall->setTailCall(); if (TheCall->getType() != Type::VoidTy) new ReturnInst(TheCall, StubBB); // Return result of the call. else