diff options
Diffstat (limited to 'examples/BrainF/BrainF.cpp')
-rw-r--r-- | examples/BrainF/BrainF.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/BrainF/BrainF.cpp b/examples/BrainF/BrainF.cpp index 54f35535b57d..67af099d1d3a 100644 --- a/examples/BrainF/BrainF.cpp +++ b/examples/BrainF/BrainF.cpp @@ -55,9 +55,9 @@ void BrainF::header(LLVMContext& C) { //Function prototypes //declare void @llvm.memset.p0i8.i32(i8 *, i8, i32, i32, i1) - const Type *Tys[] = { Type::getInt8PtrTy(C), Type::getInt32Ty(C) }; + Type *Tys[] = { Type::getInt8PtrTy(C), Type::getInt32Ty(C) }; Function *memset_func = Intrinsic::getDeclaration(module, Intrinsic::memset, - Tys, 2); + Tys); //declare i32 @getchar() getchar_func = cast<Function>(module-> @@ -99,7 +99,7 @@ void BrainF::header(LLVMContext& C) { }; CallInst *memset_call = builder-> - CreateCall(memset_func, memset_params, array_endof(memset_params)); + CreateCall(memset_func, memset_params); memset_call->setTailCall(false); } @@ -171,7 +171,7 @@ void BrainF::header(LLVMContext& C) { CallInst *puts_call = CallInst::Create(puts_func, - puts_params, array_endof(puts_params), + puts_params, "", aberrorbb); puts_call->setTailCall(false); } @@ -229,7 +229,7 @@ void BrainF::readloop(PHINode *phi, BasicBlock *oldbb, BasicBlock *testbb, }; CallInst *putchar_call = builder-> CreateCall(putchar_func, - putchar_params, array_endof(putchar_params)); + putchar_params); putchar_call->setTailCall(false); } break; |