mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-04 18:24:38 +00:00
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
This commit is contained in:
@ -440,11 +440,10 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/// PointerType - Class to represent pointers
|
/// PointerType - Class to represent pointers.
|
||||||
///
|
///
|
||||||
class PointerType : public SequentialType {
|
class PointerType : public SequentialType {
|
||||||
friend class TypeMap<PointerValType, PointerType>;
|
friend class TypeMap<PointerValType, PointerType>;
|
||||||
unsigned AddressSpace;
|
|
||||||
|
|
||||||
PointerType(const PointerType &); // Do not implement
|
PointerType(const PointerType &); // Do not implement
|
||||||
const PointerType &operator=(const PointerType &); // Do not implement
|
const PointerType &operator=(const PointerType &); // Do not implement
|
||||||
@ -465,7 +464,7 @@ public:
|
|||||||
static bool isValidElementType(const Type *ElemTy);
|
static bool isValidElementType(const Type *ElemTy);
|
||||||
|
|
||||||
/// @brief Return the address space of the Pointer type.
|
/// @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.
|
// Implement the AbstractTypeUser interface.
|
||||||
virtual void refineAbstractType(const DerivedType *OldTy, const Type *NewTy);
|
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 {
|
class OpaqueType : public DerivedType {
|
||||||
friend class LLVMContextImpl;
|
friend class LLVMContextImpl;
|
||||||
|
@ -533,7 +533,7 @@ VectorType::VectorType(const Type *ElType, unsigned NumEl)
|
|||||||
|
|
||||||
PointerType::PointerType(const Type *E, unsigned AddrSpace)
|
PointerType::PointerType(const Type *E, unsigned AddrSpace)
|
||||||
: SequentialType(PointerTyID, E) {
|
: SequentialType(PointerTyID, E) {
|
||||||
AddressSpace = AddrSpace;
|
setSubclassData(AddrSpace);
|
||||||
// Calculate whether or not this type is abstract
|
// Calculate whether or not this type is abstract
|
||||||
setAbstract(E->isAbstract());
|
setAbstract(E->isAbstract());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user