[opaque pointer type] Track explicit GEP pointee type through in-memory IR

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236510 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2015-05-05 18:03:48 +00:00
parent 4def1cbf5d
commit a67d5abd53
4 changed files with 34 additions and 16 deletions

View File

@ -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()));
}