summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorEduard Burtescu <edy.burt@gmail.com>2016-01-18 00:10:01 +0000
committerEduard Burtescu <edy.burt@gmail.com>2016-01-18 00:10:01 +0000
commit90c4449128ab600d5aef592c063e1044d0c8e330 (patch)
tree538d75e667977dc86ba83c8ac25572a7229a4f34 /llvm/lib/CodeGen
parent6435c6ede034361f1e4dfdff5b6584418c27cb51 (diff)
downloadbcm5719-llvm-90c4449128ab600d5aef592c063e1044d0c8e330.tar.gz
bcm5719-llvm-90c4449128ab600d5aef592c063e1044d0c8e330.zip
[opaque pointer types] Alloca: use getAllocatedType() instead of getType()->getPointerElementType().
Reviewers: mjacob Subscribers: llvm-commits, dblaikie Differential Revision: http://reviews.llvm.org/D16272 llvm-svn: 258028
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/GCRootLowering.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/GCRootLowering.cpp b/llvm/lib/CodeGen/GCRootLowering.cpp
index 484d31737b2..df6be1e4242 100644
--- a/llvm/lib/CodeGen/GCRootLowering.cpp
+++ b/llvm/lib/CodeGen/GCRootLowering.cpp
@@ -170,8 +170,7 @@ static bool InsertRootInitializers(Function &F, AllocaInst **Roots,
for (AllocaInst **I = Roots, **E = Roots + Count; I != E; ++I)
if (!InitedRoots.count(*I)) {
StoreInst *SI = new StoreInst(
- ConstantPointerNull::get(cast<PointerType>(
- cast<PointerType>((*I)->getType())->getElementType())),
+ ConstantPointerNull::get(cast<PointerType>((*I)->getAllocatedType())),
*I);
SI->insertAfter(*I);
MadeChange = true;
OpenPOWER on IntegriCloud