Skip to content

Commit

Permalink
Fix some code to make it actually work.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43217 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
resistor committed Oct 22, 2007
1 parent 8c6c72d commit d2ae9a9
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions docs/tutorial/JITTutorial1.html
Original file line number Diff line number Diff line change
Expand Up @@ -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&lt;Function&gt;(c);
mul_add->setCallingConv(CallingConv::C);
Expand Down Expand Up @@ -140,6 +141,8 @@
tmp, z, "tmp2");

builder.CreateRet(tmp2);

return mod;
}
</pre>
</div>
Expand Down

0 comments on commit d2ae9a9

Please sign in to comment.