diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-01-08 20:19:51 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-01-08 20:19:51 +0000 |
| commit | f806d9f2d055416add700e0bbb1ca5429292cfaa (patch) | |
| tree | b8d9c2c69a5fd6c88358167636a8fef142987d10 /llvm/lib | |
| parent | d662b785efa4eddbbba1af20ddbc7ea9791a3175 (diff) | |
| download | bcm5719-llvm-f806d9f2d055416add700e0bbb1ca5429292cfaa.tar.gz bcm5719-llvm-f806d9f2d055416add700e0bbb1ca5429292cfaa.zip | |
Allow arrays to have more than 4G elements.
llvm-svn: 19395
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/VMCore/Type.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/VMCore/Type.cpp b/llvm/lib/VMCore/Type.cpp index 0496986ba0e..d2d6a2a9439 100644 --- a/llvm/lib/VMCore/Type.cpp +++ b/llvm/lib/VMCore/Type.cpp @@ -401,7 +401,7 @@ StructType::StructType(const std::vector<const Type*> &Types) setAbstract(isAbstract); } -ArrayType::ArrayType(const Type *ElType, unsigned NumEl) +ArrayType::ArrayType(const Type *ElType, uint64_t NumEl) : SequentialType(ArrayTyID, ElType) { NumElements = NumEl; @@ -894,16 +894,16 @@ FunctionType *FunctionType::get(const Type *ReturnType, namespace llvm { class ArrayValType { const Type *ValTy; - unsigned Size; + uint64_t Size; public: - ArrayValType(const Type *val, int sz) : ValTy(val), Size(sz) {} + ArrayValType(const Type *val, uint64_t sz) : ValTy(val), Size(sz) {} static ArrayValType get(const ArrayType *AT) { return ArrayValType(AT->getElementType(), AT->getNumElements()); } static unsigned hashTypeStructure(const ArrayType *AT) { - return AT->getNumElements(); + return (unsigned)AT->getNumElements(); } // Subclass should override this... to update self as usual @@ -921,7 +921,7 @@ public: static TypeMap<ArrayValType, ArrayType> ArrayTypes; -ArrayType *ArrayType::get(const Type *ElementType, unsigned NumElements) { +ArrayType *ArrayType::get(const Type *ElementType, uint64_t NumElements) { assert(ElementType && "Can't get array of null types!"); ArrayValType AVT(ElementType, NumElements); |

