[llvm-commits] [llvm] r135374 - /llvm/trunk/examples/BrainF/BrainF.cpp
Chris Lattner
sabre at nondot.org
Sun Jul 17 21:52:58 PDT 2011
Author: lattner
Date: Sun Jul 17 23:52:58 2011
New Revision: 135374
URL: http://llvm.org/viewvc/llvm-project?rev=135374&view=rev
Log:
update for recent api changes. I have a hard time believing that this is actually a useful example.
Modified:
llvm/trunk/examples/BrainF/BrainF.cpp
Modified: llvm/trunk/examples/BrainF/BrainF.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/BrainF/BrainF.cpp?rev=135374&r1=135373&r2=135374&view=diff
==============================================================================
--- llvm/trunk/examples/BrainF/BrainF.cpp (original)
+++ llvm/trunk/examples/BrainF/BrainF.cpp Sun Jul 17 23:52:58 2011
@@ -80,8 +80,8 @@
//%arr = malloc i8, i32 %d
ConstantInt *val_mem = ConstantInt::get(C, APInt(32, memtotal));
BasicBlock* BB = builder->GetInsertBlock();
- const Type* IntPtrTy = IntegerType::getInt32Ty(C);
- const Type* Int8Ty = IntegerType::getInt8Ty(C);
+ Type* IntPtrTy = IntegerType::getInt32Ty(C);
+ Type* Int8Ty = IntegerType::getInt8Ty(C);
Constant* allocsize = ConstantExpr::getSizeOf(Int8Ty);
allocsize = ConstantExpr::getTruncOrBitCast(allocsize, IntPtrTy);
ptr_arr = CallInst::CreateMalloc(BB, IntPtrTy, Int8Ty, allocsize, val_mem,
More information about the llvm-commits
mailing list