mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-23 12:08:25 +00:00
Add a special version of getType for ConstantPointerNull, exposing the fact
that all Null pointers have pointer type llvm-svn: 15458
This commit is contained in:
parent
8eda57f392
commit
a81b270e18
@ -454,6 +454,13 @@ public:
|
|||||||
|
|
||||||
virtual void destroyConstant();
|
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:
|
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static inline bool classof(const ConstantPointerNull *) { return true; }
|
static inline bool classof(const ConstantPointerNull *) { return true; }
|
||||||
static bool classof(const Value *V) {
|
static bool classof(const Value *V) {
|
||||||
|
Loading…
Reference in New Issue
Block a user