projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1893b63
)
[OpaquePtr] Use AllocaInst::getAllocatedType()
author
Arthur Eubanks
<aeubanks@google.com>
Tue, 13 Jul 2021 16:25:28 +0000
(09:25 -0700)
committer
Arthur Eubanks
<aeubanks@google.com>
Tue, 13 Jul 2021 16:34:33 +0000
(09:34 -0700)
llvm/lib/Target/NVPTX/NVPTXLowerAlloca.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Target/NVPTX/NVPTXLowerAlloca.cpp
b/llvm/lib/Target/NVPTX/NVPTXLowerAlloca.cpp
index cf488b06f06c77d0330329713991ded35bb8c9bc..1bd02552b66688c0be11d2021f52ab291753dada 100644
(file)
--- a/
llvm/lib/Target/NVPTX/NVPTXLowerAlloca.cpp
+++ b/
llvm/lib/Target/NVPTX/NVPTXLowerAlloca.cpp
@@
-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())->getElement
Type();
+ auto ETy =
allocaInst->getAllocated
Type();
auto LocalAddrTy = PointerType::get(ETy, ADDRESS_SPACE_LOCAL);
auto NewASCToLocal = new AddrSpaceCastInst(allocaInst, LocalAddrTy, "");
auto GenericAddrTy = PointerType::get(ETy, ADDRESS_SPACE_GENERIC);