summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/SystemZ
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-10-21 17:16:03 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-10-21 17:16:03 +0000
commitae9971255990a4f3cf93fa81a5b44dabd2aa747c (patch)
tree27134711949b484b5f14861558dff4c716763f27 /llvm/lib/Target/SystemZ
parent57e8f0b05545ded4f2da1979ee9b19af55f3c004 (diff)
downloadbcm5719-llvm-ae9971255990a4f3cf93fa81a5b44dabd2aa747c.tar.gz
bcm5719-llvm-ae9971255990a4f3cf93fa81a5b44dabd2aa747c.zip
SystemZISelLowering - supportedAddressingMode - 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: 375430
Diffstat (limited to 'llvm/lib/Target/SystemZ')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZISelLowering.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
index d69f578735a..e0ca9da9356 100644
--- a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
@@ -847,7 +847,7 @@ supportedAddressingMode(Instruction *I, bool HasVector) {
}
if (isa<LoadInst>(I) && I->hasOneUse()) {
- auto *SingleUser = dyn_cast<Instruction>(*I->user_begin());
+ auto *SingleUser = cast<Instruction>(*I->user_begin());
if (SingleUser->getParent() == I->getParent()) {
if (isa<ICmpInst>(SingleUser)) {
if (auto *C = dyn_cast<ConstantInt>(SingleUser->getOperand(1)))
OpenPOWER on IntegriCloud