mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:43:36 +01:00
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
This commit is contained in:
parent
d838c9db5d
commit
b98a2c3cd3
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user