mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
[OpaquePtr] Use AllocaInst::getAllocatedType()
This commit is contained in:
parent
7dbb7fdf61
commit
3e7b44f0dc
@ -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
Block a user