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:
parent
d9e11d33c1
commit
5a12af69eb
@ -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") {
|
||||
|
Loading…
Reference in New Issue
Block a user