Provide support for HP/UX aCC compiler's variant of hash_map and hash_set
[oota-llvm.git] / include / llvm / DerivedTypes.h
index add873ce2db50a1f2ca2cc8a160f4ae3d62db972..fe180008da322689d3df23918b265c994dc6f4fe 100644 (file)
@@ -19,6 +19,7 @@
 #define LLVM_DERIVED_TYPES_H
 
 #include "llvm/Type.h"
+#include "llvm/Support/DataTypes.h"
 
 namespace llvm {
 
@@ -140,7 +141,7 @@ public:
   /// getNumParams - Return the number of fixed parameters this function type
   /// requires.  This does not consider varargs.
   ///
-  unsigned getNumParams() const { return ContainedTys.size()-1; }
+  unsigned getNumParams() const { return (unsigned)ContainedTys.size()-1; }
 
   // Implement the AbstractTypeUser interface.
   virtual void refineAbstractType(const DerivedType *OldTy, const Type *NewTy);
@@ -206,7 +207,7 @@ public:
   element_iterator element_end() const { return ContainedTys.end(); }
 
   // Random access to the elements
-  unsigned getNumElements() const { return ContainedTys.size(); }
+  unsigned getNumElements() const { return (unsigned)ContainedTys.size(); }
   const Type *getElementType(unsigned N) const {
     assert(N < ContainedTys.size() && "Element number out of range!");
     return ContainedTys[N];
@@ -273,7 +274,7 @@ public:
 ///
 class ArrayType : public SequentialType {
   friend class TypeMap<ArrayValType, ArrayType>;
-  unsigned NumElements;
+  uint64_t NumElements;
 
   ArrayType(const ArrayType &);                   // Do not implement
   const ArrayType &operator=(const ArrayType &);  // Do not implement
@@ -284,15 +285,15 @@ protected:
   ///
   /// Private ctor - Only can be created by a static member...
   ///
-  ArrayType(const Type *ElType, unsigned NumEl);
+  ArrayType(const Type *ElType, uint64_t NumEl);
 
 public:
   /// ArrayType::get - This static method is the primary way to construct an
   /// ArrayType
   ///
-  static ArrayType *get(const Type *ElementType, unsigned NumElements);
+  static ArrayType *get(const Type *ElementType, uint64_t NumElements);
 
-  inline unsigned    getNumElements() const { return NumElements; }
+  inline uint64_t getNumElements() const { return NumElements; }
 
   // Implement the AbstractTypeUser interface.
   virtual void refineAbstractType(const DerivedType *OldTy, const Type *NewTy);
@@ -328,7 +329,7 @@ public:
   ///
   static PackedType *get(const Type *ElementType, unsigned NumElements);
 
-  inline unsigned    getNumElements() const { return NumElements; }
+  inline unsigned getNumElements() const { return NumElements; }
 
   // Implement the AbstractTypeUser interface.
   virtual void refineAbstractType(const DerivedType *OldTy, const Type *NewTy);