Fix "pointer is null" static analyzer warning. NFCI.

Use cast<> instead of dyn_cast<> since we know that the pointer should be valid (and is dereferenced immediately below in the getSignature call).
This commit is contained in:
Simon Pilgrim 2020-01-08 16:52:05 +00:00
parent 5936717fa6
commit 19bfb6d8df
1 changed files with 1 additions and 1 deletions

View File

@ -453,7 +453,7 @@ Function *WebAssemblyLowerEmscriptenEHSjLj::getInvokeWrapper(CallOrInvoke *CI) {
CalleeFTy = F->getFunctionType(); CalleeFTy = F->getFunctionType();
else { else {
auto *CalleeTy = cast<PointerType>(Callee->getType())->getElementType(); auto *CalleeTy = cast<PointerType>(Callee->getType())->getElementType();
CalleeFTy = dyn_cast<FunctionType>(CalleeTy); CalleeFTy = cast<FunctionType>(CalleeTy);
} }
std::string Sig = getSignature(CalleeFTy); std::string Sig = getSignature(CalleeFTy);