These are legal for tail calls
[oota-llvm.git] / examples / HowToUseJIT / HowToUseJIT.cpp
index 31ea4f454048ccfd38b50728c767e6dc8c730724..192c76dcce1c919dc64d1217fd72a515a4e003de 100644 (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);