Delete the Module object.
authorBill Wendling <isanbard@gmail.com>
Mon, 19 May 2008 00:15:33 +0000 (00:15 +0000)
committerBill Wendling <isanbard@gmail.com>
Mon, 19 May 2008 00:15:33 +0000 (00:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51233 91177308-0d34-0410-b5e6-96231b3b80d8

docs/tutorial/JITTutorial1.html

index 5228982ead848c3c52a90a7fbdec7d058e376ef0..87b7ed6da8db00d8e505375b9bc3d068d548aff6 100644 (file)
@@ -81,6 +81,7 @@ int main(int argc, char**argv) {
   PM.add(new PrintModulePass(&amp;llvm::cout));
   PM.run(*Mod);
 
+  delete Mod;
   return 0;
 }
 </pre>
@@ -161,7 +162,7 @@ function will interoperate properly with C code, which is a good thing.</p>
 <div class="doc_code">
 <pre>
   Value* tmp = builder.CreateBinOp(Instruction::Mul,
-                                    x, y, "tmp");
+                                   x, y, "tmp");
   Value* tmp2 = builder.CreateBinOp(Instruction::Add,
                                     tmp, z, "tmp2");