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:
b5d2e23
)
[OpenMPOpt] Use cast<> instead of dyn_cast<> to avoid dereference of nullptr. NFC
author
Simon Pilgrim
<llvm-dev@redking.me.uk>
Sat, 8 Jan 2022 13:47:35 +0000
(13:47 +0000)
committer
Simon Pilgrim
<llvm-dev@redking.me.uk>
Sat, 8 Jan 2022 13:47:35 +0000
(13:47 +0000)
llvm/lib/Transforms/IPO/OpenMPOpt.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
index
a28c850
..
2b29a0c
100644
(file)
--- a/
llvm/lib/Transforms/IPO/OpenMPOpt.cpp
+++ b/
llvm/lib/Transforms/IPO/OpenMPOpt.cpp
@@
-2754,7
+2754,7
@@
struct AAHeapToSharedFunction : public AAHeapToShared {
if (FreeCalls.size() != 1)
continue;
-
ConstantInt *AllocSize = dyn_
cast<ConstantInt>(CB->getArgOperand(0));
+
auto *AllocSize =
cast<ConstantInt>(CB->getArgOperand(0));
LLVM_DEBUG(dbgs() << TAG << "Replace globalization call " << *CB
<< " with " << AllocSize->getZExtValue()