forked from OSchip/llvm-project
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:
parent
2462d421ee
commit
c81f8e4ce1
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue