llvm.org GIT mirror llvm / 4b3d546
update for recent api changes. I have a hard time believing that this is actually a useful example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135374 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 8 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
7979 //%arr = malloc i8, i32 %d
8080 ConstantInt *val_mem = ConstantInt::get(C, APInt(32, memtotal));
8181 BasicBlock* BB = builder->GetInsertBlock();
82 const Type* IntPtrTy = IntegerType::getInt32Ty(C);
83 const Type* Int8Ty = IntegerType::getInt8Ty(C);
82 Type* IntPtrTy = IntegerType::getInt32Ty(C);
83 Type* Int8Ty = IntegerType::getInt8Ty(C);
8484 Constant* allocsize = ConstantExpr::getSizeOf(Int8Ty);
8585 allocsize = ConstantExpr::getTruncOrBitCast(allocsize, IntPtrTy);
8686 ptr_arr = CallInst::CreateMalloc(BB, IntPtrTy, Int8Ty, allocsize, val_mem,