#define LLVM_DERIVED_TYPES_H
#include "llvm/Type.h"
+#include "llvm/Support/DataTypes.h"
namespace llvm {
/// 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);
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];
///
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
///
/// 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);
///
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);