diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-09-26 16:30:36 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-09-26 16:30:36 +0000 |
commit | 514e6b6e6ed9d05e263e01dc80b1e1b9663aab38 (patch) | |
tree | a8c75cf217d6098b7bf2898e4a66f8a30b7bd4b5 /llvm/lib/Analysis/ConstantFolding.cpp | |
parent | 2cf54d7b713ce3f60cd44a3c084b5d42cb190f4c (diff) | |
download | bcm5719-llvm-514e6b6e6ed9d05e263e01dc80b1e1b9663aab38.tar.gz bcm5719-llvm-514e6b6e6ed9d05e263e01dc80b1e1b9663aab38.zip |
ConstantFold - silence static analyzer dyn_cast<ExtractValueInst> null dereference warning. NFCI.
The static analyzer is warning about a potential null dereference, but we should be able to use cast<ExtractValueInst> directly and if not assert will fire for us.
llvm-svn: 372993
Diffstat (limited to 'llvm/lib/Analysis/ConstantFolding.cpp')
-rw-r--r-- | llvm/lib/Analysis/ConstantFolding.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp index 8cad7d90a64..f8ea8cfc354 100644 --- a/llvm/lib/Analysis/ConstantFolding.cpp +++ b/llvm/lib/Analysis/ConstantFolding.cpp @@ -1056,7 +1056,7 @@ Constant *ConstantFoldInstOperandsImpl(const Value *InstOrCE, unsigned Opcode, return ConstantExpr::getExtractElement(Ops[0], Ops[1]); case Instruction::ExtractValue: return ConstantExpr::getExtractValue( - Ops[0], dyn_cast<ExtractValueInst>(InstOrCE)->getIndices()); + Ops[0], cast<ExtractValueInst>(InstOrCE)->getIndices()); case Instruction::InsertElement: return ConstantExpr::getInsertElement(Ops[0], Ops[1], Ops[2]); case Instruction::ShuffleVector: |