diff options
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LowerAllocations.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LowerAllocations.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LowerAllocations.cpp b/llvm/lib/Transforms/Scalar/LowerAllocations.cpp index ceb45f59c67..882485f8ff7 100644 --- a/llvm/lib/Transforms/Scalar/LowerAllocations.cpp +++ b/llvm/lib/Transforms/Scalar/LowerAllocations.cpp @@ -67,7 +67,7 @@ bool LowerAllocations::doPerMethodWork(Method *M) { if (MallocInst *MI = dyn_cast<MallocInst>(*(BBIL.begin()+i))) { BBIL.remove(BBIL.begin()+i); // remove the malloc instr... - const Type *AllocTy = cast<PointerType>(MI->getType())->getValueType(); + const Type *AllocTy =cast<PointerType>(MI->getType())->getElementType(); // If the user is allocating an unsized array with a dynamic size arg, // start by getting the size of one element. |