summaryrefslogtreecommitdiff
path: root/examples/BrainF/BrainF.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/BrainF/BrainF.cpp')
-rw-r--r--examples/BrainF/BrainF.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/BrainF/BrainF.cpp b/examples/BrainF/BrainF.cpp
index f8129b819e3a6..8026adc8d075a 100644
--- a/examples/BrainF/BrainF.cpp
+++ b/examples/BrainF/BrainF.cpp
@@ -163,7 +163,7 @@ void BrainF::header(LLVMContext& C) {
};
Constant *msgptr = ConstantExpr::
- getGetElementPtr(aberrormsg, gep_params);
+ getGetElementPtr(aberrormsg->getValueType(), aberrormsg, gep_params);
Value *puts_params[] = {
msgptr
@@ -201,7 +201,8 @@ void BrainF::readloop(PHINode *phi, BasicBlock *oldbb, BasicBlock *testbb,
case SYM_READ:
{
//%tape.%d = call i32 @getchar()
- CallInst *getchar_call = builder->CreateCall(getchar_func, tapereg);
+ CallInst *getchar_call =
+ builder->CreateCall(getchar_func, {}, tapereg);
getchar_call->setTailCall(false);
Value *tape_0 = getchar_call;