[llvm-commits] [llvm] r43217 - /llvm/trunk/docs/tutorial/JITTutorial1.html

Owen Anderson resistor at mac.com
Sun Oct 21 23:29:31 PDT 2007


Author: resistor
Date: Mon Oct 22 01:29:31 2007
New Revision: 43217

URL: http://llvm.org/viewvc/llvm-project?rev=43217&view=rev
Log:
Fix some code to make it actually work.

Modified:
    llvm/trunk/docs/tutorial/JITTutorial1.html

Modified: llvm/trunk/docs/tutorial/JITTutorial1.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/JITTutorial1.html?rev=43217&r1=43216&r2=43217&view=diff

==============================================================================
--- llvm/trunk/docs/tutorial/JITTutorial1.html (original)
+++ llvm/trunk/docs/tutorial/JITTutorial1.html Mon Oct 22 01:29:31 2007
@@ -90,11 +90,12 @@
 
 <div class="doc_code">
 <pre>
-  Constant* c->getOrInsertFunction("mul_add",
-  /*ret type*/                     IntegerType::get(32),
-  /*args*/                         IntegerType::get(32),
-                                   IntegerType::get(32),
-                                   IntegerType::get(32));
+  Constant* c = mod->getOrInsertFunction("mul_add",
+  /*ret type*/                           IntegerType::get(32),
+  /*args*/                               IntegerType::get(32),
+                                         IntegerType::get(32),
+                                         IntegerType::get(32),
+  /*varargs terminated with null*/       NULL);
   
   Function* mul_add = cast<Function>(c);
   mul_add->setCallingConv(CallingConv::C);
@@ -140,6 +141,8 @@
                                     tmp, z, "tmp2");
 
   builder.CreateRet(tmp2);
+  
+  return mod;
 }
 </pre>
 </div>





More information about the llvm-commits mailing list