1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00

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 4bb16bdf09
commit 3763eba193

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;