diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-09-24 10:46:30 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-09-24 10:46:30 +0000 |
commit | c81f8e4ce10303d0e787383d985fc93b7052f78a (patch) | |
tree | 4974871412dc04d70cb2b8d4d3011e1cfd09fa4a | |
parent | 2462d421ee250eb45b84af054dd05ff2fca2514a (diff) | |
download | bcm5719-llvm-c81f8e4ce10303d0e787383d985fc93b7052f78a.tar.gz bcm5719-llvm-c81f8e4ce10303d0e787383d985fc93b7052f78a.zip |
lowerObjCCall - silence static analyzer dyn_cast<CallInst> null dereference warnings. NFCI.
The static analyzer is warning about a potential null dereference, but we should be able to use cast<CallInst> directly and if not assert will fire for us.
llvm-svn: 372720
-rw-r--r-- | llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp b/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp index 2752e186875..0d2f6f99ca9 100644 --- a/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp +++ b/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp @@ -76,7 +76,7 @@ static bool lowerObjCCall(Function &F, const char *NewFn, } for (auto I = F.use_begin(), E = F.use_end(); I != E;) { - auto *CI = dyn_cast<CallInst>(I->getUser()); + auto *CI = cast<CallInst>(I->getUser()); assert(CI->getCalledFunction() && "Cannot lower an indirect call!"); ++I; |