The pointer is used immediately inside the getSymbol() call, so assert the cast is correct instead of returning nullptr
const Function &F = MF->getFunction();
assert(F.hasPersonalityFn() &&
"Landingpads are presented, but no personality routine is found.");
- const GlobalValue *Per =
- dyn_cast<GlobalValue>(F.getPersonalityFn()->stripPointerCasts());
+ const auto *Per =
+ cast<GlobalValue>(F.getPersonalityFn()->stripPointerCasts());
const MCSymbol *PerSym = Asm->TM.getSymbol(Per);
emitExceptionInfoTable(LSDALabel, PerSym);