diff options
Diffstat (limited to 'lib/Transforms/Utils/LowerAllocations.cpp')
-rw-r--r-- | lib/Transforms/Utils/LowerAllocations.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp index 8f61d88089..68108fa0f2 100644 --- a/lib/Transforms/Utils/LowerAllocations.cpp +++ b/lib/Transforms/Utils/LowerAllocations.cpp @@ -118,7 +118,7 @@ bool LowerAllocations::runOnBasicBlock(BasicBlock &BB) { // malloc(type) becomes i8 *malloc(size) Value *MallocArg; if (LowerMallocArgToInteger) - MallocArg = Context.getConstantInt(Type::Int64Ty, + MallocArg = ConstantInt::get(Type::Int64Ty, TD.getTypeAllocSize(AllocTy)); else MallocArg = Context.getConstantExprSizeOf(AllocTy); |