forked from OSchip/llvm-project
[OpenMPOpt] Use cast<> instead of dyn_cast<> to avoid dereference of nullptr. NFC
This commit is contained in:
parent
b5d2e232b8
commit
274359cf09
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue