that all Null pointers have pointer type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15458
91177308-0d34-0410-b5e6-
96231b3b80d8
virtual void destroyConstant();
+ /// getType - Specialize the getType() method to always return an PointerType,
+ /// which reduces the amount of casting needed in parts of the compiler.
+ ///
+ inline const PointerType *getType() const {
+ return reinterpret_cast<const PointerType*>(Value::getType());
+ }
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const ConstantPointerNull *) { return true; }
static bool classof(const Value *V) {