diff --git a/include/llvm/Support/Casting.h b/include/llvm/Support/Casting.h index 3aab4367f5b..d35febbe6d8 100644 --- a/include/llvm/Support/Casting.h +++ b/include/llvm/Support/Casting.h @@ -65,18 +65,21 @@ template struct isa_impl_cl { template struct isa_impl_cl { static inline bool doit(const From *Val) { + assert(Val && "isa<> used on a null pointer"); return isa_impl::doit(*Val); } }; template struct isa_impl_cl { static inline bool doit(const From *Val) { + assert(Val && "isa<> used on a null pointer"); return isa_impl::doit(*Val); } }; template struct isa_impl_cl { static inline bool doit(const From *Val) { + assert(Val && "isa<> used on a null pointer"); return isa_impl::doit(*Val); } };