forked from OSchip/llvm-project
[OpaquePtr] Use AllocaInst::getAllocatedType()
This commit is contained in:
parent
1893b630fe
commit
b25aca503d
|
@ -70,7 +70,7 @@ bool NVPTXLowerAlloca::runOnFunction(Function &F) {
|
|||
for (auto &I : BB) {
|
||||
if (auto allocaInst = dyn_cast<AllocaInst>(&I)) {
|
||||
Changed = true;
|
||||
auto ETy = cast<PointerType>(allocaInst->getType())->getElementType();
|
||||
auto ETy = allocaInst->getAllocatedType();
|
||||
auto LocalAddrTy = PointerType::get(ETy, ADDRESS_SPACE_LOCAL);
|
||||
auto NewASCToLocal = new AddrSpaceCastInst(allocaInst, LocalAddrTy, "");
|
||||
auto GenericAddrTy = PointerType::get(ETy, ADDRESS_SPACE_GENERIC);
|
||||
|
|
Loading…
Reference in New Issue