diff options
author | Owen Anderson <resistor@mac.com> | 2007-10-22 06:29:31 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2007-10-22 06:29:31 +0000 |
commit | bbed04336ca0d82bba40bbde90114a6e785bc22d (patch) | |
tree | ac4f0b8b6c81ea34045308f331bcb90a671b710f /llvm/docs/tutorial | |
parent | 8830ffed4c507d047d9692e08dd853c180ffded4 (diff) | |
download | bcm5719-llvm-bbed04336ca0d82bba40bbde90114a6e785bc22d.tar.gz bcm5719-llvm-bbed04336ca0d82bba40bbde90114a6e785bc22d.zip |
Fix some code to make it actually work.
llvm-svn: 43217
Diffstat (limited to 'llvm/docs/tutorial')
-rw-r--r-- | llvm/docs/tutorial/JITTutorial1.html | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/llvm/docs/tutorial/JITTutorial1.html b/llvm/docs/tutorial/JITTutorial1.html index 77570164035..1de1a9d8061 100644 --- a/llvm/docs/tutorial/JITTutorial1.html +++ b/llvm/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<Function>(c); mul_add->setCallingConv(CallingConv::C); @@ -140,6 +141,8 @@ Module* makeLLVMModule() { tmp, z, "tmp2"); builder.CreateRet(tmp2); + + return mod; } </pre> </div> |