aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/LowerAllocations.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Utils/LowerAllocations.cpp')
-rw-r--r--lib/Transforms/Utils/LowerAllocations.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp
index ceb45f59c6..882485f8ff 100644
--- a/lib/Transforms/Utils/LowerAllocations.cpp
+++ b/lib/Transforms/Utils/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.