diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-09-24 11:17:13 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-09-24 11:17:13 +0000 |
commit | 9e8076b2197c072082659a4fac9b86ea209c0e3b (patch) | |
tree | b83c652624c3f592d1198e1907b0a116586fb74a /llvm/lib/Transforms/Utils/SimplifyCFG.cpp | |
parent | bc58230e29d53651c9cd17b97974a20ae87fef02 (diff) | |
download | bcm5719-llvm-9e8076b2197c072082659a4fac9b86ea209c0e3b.tar.gz bcm5719-llvm-9e8076b2197c072082659a4fac9b86ea209c0e3b.zip |
SimplifyCFG - silence static analyzer dyn_cast<LandingPadInst> null dereference warning. NFCI.
The static analyzer is warning about a potential null dereference, but we should be able to use cast<LandingPadInst> directly and if not assert will fire for us.
llvm-svn: 372727
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index 9b14aa843d6..839cb9b5c2a 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -3896,7 +3896,7 @@ bool SimplifyCFGOpt::SimplifyCommonResume(ResumeInst *RI) { // Simplify resume that is only used by a single (non-phi) landing pad. bool SimplifyCFGOpt::SimplifySingleResume(ResumeInst *RI) { BasicBlock *BB = RI->getParent(); - LandingPadInst *LPInst = dyn_cast<LandingPadInst>(BB->getFirstNonPHI()); + auto *LPInst = cast<LandingPadInst>(BB->getFirstNonPHI()); assert(RI->getValue() == LPInst && "Resume must unwind the exception that caused control to here"); |