-/// ConstantPointer - Constant Pointer Declarations
-///
-/// The ConstantPointer class represents a null pointer of a specific type. For
-/// a more specific/useful instance, a subclass of ConstantPointer should be
-/// used.
-///
-class ConstantPointer : public Constant {
- ConstantPointer(const ConstantPointer &); // DO NOT IMPLEMENT
-protected:
- inline ConstantPointer(const PointerType *T)
- : Constant(reinterpret_cast<const Type*>(T)) { }
-public:
- inline const PointerType *getType() const {
- return reinterpret_cast<const PointerType*>(Value::getType());
- }
-
- /// isNullValue - Return true if this is the value that would be returned by
- /// getNullValue.
- virtual bool isNullValue() const { return false; }
-
- /// Methods for support type inquiry through isa, cast, and dyn_cast:
- static inline bool classof(const ConstantPointer *) { return true; }
- static bool classof(const Constant *CPV); // defined in Constants.cpp
- static inline bool classof(const Value *V) {
- return isa<Constant>(V) && classof(cast<Constant>(V));
- }
-};
-