[PATCH] D75600: Add nullptr check to isLandingPad

Lukas Diekmann via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 6 04:24:31 PST 2020


ptersilie added a comment.

`isa` does have an assertion that the argument must not be a `nullptr`. However, this assertion doesn't trigger when LLVM is compiled with assertions off (which as far as I can tell is the default). I think at the very least we could add a comment to the documentation that `isLandingPad` should not be called without checking first that `getFirstNonPHI() != nullptr`. I'd be happy to update the PR if this is what you decide is the best course of action.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75600/new/

https://reviews.llvm.org/D75600





More information about the llvm-commits mailing list