diff options
Diffstat (limited to 'include/llvm/Support/Casting.h')
-rw-r--r-- | include/llvm/Support/Casting.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/Support/Casting.h b/include/llvm/Support/Casting.h index 3aab4367f5..d35febbe6d 100644 --- a/include/llvm/Support/Casting.h +++ b/include/llvm/Support/Casting.h @@ -65,18 +65,21 @@ template <typename To, typename From> struct isa_impl_cl<To, const From> { template <typename To, typename From> struct isa_impl_cl<To, From*> { static inline bool doit(const From *Val) { + assert(Val && "isa<> used on a null pointer"); return isa_impl<To, From>::doit(*Val); } }; template <typename To, typename From> struct isa_impl_cl<To, const From*> { static inline bool doit(const From *Val) { + assert(Val && "isa<> used on a null pointer"); return isa_impl<To, From>::doit(*Val); } }; template <typename To, typename From> struct isa_impl_cl<To, const From*const> { static inline bool doit(const From *Val) { + assert(Val && "isa<> used on a null pointer"); return isa_impl<To, From>::doit(*Val); } }; |