1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00

WinException::emitExceptHandlerTable - silence static analyzer dyn_cast<Function> null dereference warning. NFCI.

The static analyzer is warning about a potential null dereference, but we should be able to use cast<Function> directly and if not assert will fire for us.

llvm-svn: 373449
This commit is contained in:
Simon Pilgrim 2019-10-02 11:48:32 +00:00
parent d9e11d33c1
commit 5a12af69eb

View File

@ -982,8 +982,7 @@ void WinException::emitExceptHandlerTable(const MachineFunction *MF) {
OS.EmitValueToAlignment(4);
OS.EmitLabel(LSDALabel);
const Function *Per =
dyn_cast<Function>(F.getPersonalityFn()->stripPointerCasts());
const auto *Per = cast<Function>(F.getPersonalityFn()->stripPointerCasts());
StringRef PerName = Per->getName();
int BaseState = -1;
if (PerName == "_except_handler4") {