Make the stub functions be tail calls

llvm-svn: 21738
This commit is contained in:
Chris Lattner 2005-05-06 06:48:54 +00:00
parent 6aacb0f9da
commit ec7773e9e8
1 changed files with 2 additions and 1 deletions

View File

@ -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