summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/JumpThreading.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-10-17 11:19:41 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-10-17 11:19:41 +0000
commit3ec83e81877da19254adcdb2e80861eec19ea928 (patch)
tree6f9890077f3fc0dc5e266d45c174b7df1966d5dc /llvm/lib/Transforms/Scalar/JumpThreading.cpp
parent2ea8b58cb6182b0e0a8982849a1702406abfc99b (diff)
downloadbcm5719-llvm-3ec83e81877da19254adcdb2e80861eec19ea928.tar.gz
bcm5719-llvm-3ec83e81877da19254adcdb2e80861eec19ea928.zip
JumpThreadingPass::UnfoldSelectInstr - silence static analyzer dyn_cast<> null dereference warning. NFCI.
The static analyzer is warning about a potential null dereference, but we should be able to use cast<> directly and if not assert will fire for us. llvm-svn: 375103
Diffstat (limited to 'llvm/lib/Transforms/Scalar/JumpThreading.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/JumpThreading.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
index ef02318ebec..5e983adbf55 100644
--- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp
+++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
@@ -2433,7 +2433,7 @@ void JumpThreadingPass::UnfoldSelectInstr(BasicBlock *Pred, BasicBlock *BB,
// |-----
// v
// BB
- BranchInst *PredTerm = dyn_cast<BranchInst>(Pred->getTerminator());
+ BranchInst *PredTerm = cast<BranchInst>(Pred->getTerminator());
BasicBlock *NewBB = BasicBlock::Create(BB->getContext(), "select.unfold",
BB->getParent(), BB);
// Move the unconditional branch to NewBB.
OpenPOWER on IntegriCloud