[OpenMPOpt] Use cast<> instead of dyn_cast<> to avoid dereference of nullptr. NFC

This commit is contained in:
Simon Pilgrim 2022-01-08 13:47:35 +00:00
parent b5d2e232b8
commit 274359cf09
1 changed files with 1 additions and 1 deletions

View File

@ -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()