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
This commit is contained in:
Simon Pilgrim 2019-09-24 10:46:30 +00:00
parent 2462d421ee
commit c81f8e4ce1
1 changed files with 1 additions and 1 deletions

View File

@ -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;