diff options
author | Chris Lattner <sabre@nondot.org> | 2011-06-16 21:17:17 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-06-16 21:17:17 +0000 |
commit | 6091eb9d7f7c371e4563952690a39ce0147c84a2 (patch) | |
tree | e6fa6eb224dc701719da4715014c61b992dee238 /include | |
parent | e43d745b5cb7c3731627740bde882a5a5b212140 (diff) |
move the address space into the subclass data field, saving a word on PointerType.
This limits the # address spaces to 2^23, which should be good enough.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133192 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/DerivedTypes.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/llvm/DerivedTypes.h b/include/llvm/DerivedTypes.h index 2c3cf2b8083..25b5978914e 100644 --- a/include/llvm/DerivedTypes.h +++ b/include/llvm/DerivedTypes.h @@ -440,11 +440,10 @@ public: }; -/// PointerType - Class to represent pointers +/// PointerType - Class to represent pointers. /// class PointerType : public SequentialType { friend class TypeMap<PointerValType, PointerType>; - unsigned AddressSpace; PointerType(const PointerType &); // Do not implement const PointerType &operator=(const PointerType &); // Do not implement @@ -465,7 +464,7 @@ public: static bool isValidElementType(const Type *ElemTy); /// @brief Return the address space of the Pointer type. - inline unsigned getAddressSpace() const { return AddressSpace; } + inline unsigned getAddressSpace() const { return getSubclassData(); } // Implement the AbstractTypeUser interface. virtual void refineAbstractType(const DerivedType *OldTy, const Type *NewTy); @@ -479,7 +478,7 @@ public: }; -/// OpaqueType - Class to represent abstract types +/// OpaqueType - Class to represent opaque types. /// class OpaqueType : public DerivedType { friend class LLVMContextImpl; |