From: Owen Anderson Date: Mon, 22 Oct 2007 06:29:31 +0000 (+0000) Subject: Fix some code to make it actually work. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=d2ae9a9481cd00838fa5fe4b667a5e15c2044c19;p=oota-llvm.git Fix some code to make it actually work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43217 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/docs/tutorial/JITTutorial1.html b/docs/tutorial/JITTutorial1.html index 77570164035..1de1a9d8061 100644 --- a/docs/tutorial/JITTutorial1.html +++ b/docs/tutorial/JITTutorial1.html @@ -90,11 +90,12 @@ Module* makeLLVMModule() {
-  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 @@ Module* makeLLVMModule() {
                                     tmp, z, "tmp2");
 
   builder.CreateRet(tmp2);
+  
+  return mod;
 }