summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-05-05 18:03:48 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-05-05 18:03:48 +0000
commit73cf872adb7983c464ad24dc28827defdf6b11d4 (patch)
tree4f79f94c1043e4b9520d5c33bcee03d1aa76394a /llvm/lib/Transforms/Utils
parent26438d26fa4966e49ada9c74d014f3ae2c14a7d2 (diff)
downloadbcm5719-llvm-73cf872adb7983c464ad24dc28827defdf6b11d4.tar.gz
bcm5719-llvm-73cf872adb7983c464ad24dc28827defdf6b11d4.zip
[opaque pointer type] Track explicit GEP pointee type through in-memory IR
llvm-svn: 236510
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r--llvm/lib/Transforms/Utils/ValueMapper.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/ValueMapper.cpp b/llvm/lib/Transforms/Utils/ValueMapper.cpp
index 5c1518d72ac..cac80accc32 100644
--- a/llvm/lib/Transforms/Utils/ValueMapper.cpp
+++ b/llvm/lib/Transforms/Utils/ValueMapper.cpp
@@ -400,5 +400,8 @@ void llvm::RemapInstruction(Instruction *I, ValueToValueMapTy &VMap,
}
if (auto *AI = dyn_cast<AllocaInst>(I))
AI->setAllocatedType(TypeMapper->remapType(AI->getAllocatedType()));
+ if (auto *GEP = dyn_cast<GetElementPtrInst>(I))
+ GEP->setSourceElementType(
+ TypeMapper->remapType(GEP->getSourceElementType()));
I->mutateType(TypeMapper->remapType(I->getType()));
}
OpenPOWER on IntegriCloud