yubing added a comment. InvokeInst inherits CallBase so it is ok to use cast<CallBase>(TI) after isa<InvokeInst>(TI) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147923/new/ https://reviews.llvm.org/D147923