summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LowerAllocations.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LowerAllocations.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/LowerAllocations.cpp2
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.
OpenPOWER on IntegriCloud