These are legal for tail calls

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21723 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2005-05-06 05:59:50 +00:00
parent ddb6db4fa1
commit 47968e4dfd
2 changed files with 5 additions and 1 deletions

View File

@ -87,7 +87,8 @@ int main() {
// Pass Ten to the call call:
std::vector<Value*> Params;
Params.push_back(Ten);
CallInst * Add1CallRes = new CallInst(Add1F, Params, "add1", BB);
CallInst *Add1CallRes = new CallInst(Add1F, Params, "add1", BB);
Add1CallRes->setTailCall(true);
// Create the return instruction and add it to the basic block.
new ReturnInst(Add1CallRes, BB);