aboutsummaryrefslogtreecommitdiff
path: root/docs/tutorial/JITTutorial1.html
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2007-10-22 06:29:31 +0000
committerOwen Anderson <resistor@mac.com>2007-10-22 06:29:31 +0000
commitd2ae9a9481cd00838fa5fe4b667a5e15c2044c19 (patch)
tree60fcd294f42300a8f2099cffda9ec53a589ce4b4 /docs/tutorial/JITTutorial1.html
parent8c6c72d0bae4f2a2cf28a45fb3bc4bb44e15001f (diff)
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
Diffstat (limited to 'docs/tutorial/JITTutorial1.html')
-rw-r--r--docs/tutorial/JITTutorial1.html13
1 files changed, 8 insertions, 5 deletions
diff --git a/docs/tutorial/JITTutorial1.html b/docs/tutorial/JITTutorial1.html
index 7757016403..1de1a9d806 100644
--- a/docs/tutorial/JITTutorial1.html
+++ b/docs/tutorial/JITTutorial1.html
@@ -90,11 +90,12 @@ Module* makeLLVMModule() {
<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);
@@ -140,6 +141,8 @@ Module* makeLLVMModule() {
tmp, z, "tmp2");
builder.CreateRet(tmp2);
+
+ return mod;
}
</pre>
</div>