+ StructType(const std::vector<const Type*> &Types, bool isPacked);
+public:
+ /// StructType::get - This static method is the primary way to create a
+ /// StructType.
+ ///
+ static StructType *get(const std::vector<const Type*> &Params,
+ bool isPacked=false);
+
+ // Iterator access to the elements
+ typedef Type::subtype_iterator element_iterator;
+ element_iterator element_begin() const { return ContainedTys; }
+ element_iterator element_end() const { return &ContainedTys[NumContainedTys];}
+
+ // Random access to the elements
+ unsigned getNumElements() const { return NumContainedTys; }
+ const Type *getElementType(unsigned N) const {
+ assert(N < NumContainedTys && "Element number out of range!");
+ return ContainedTys[N];
+ }
+
+ /// getTypeAtIndex - Given an index value into the type, return the type of
+ /// the element. For a structure type, this must be a constant value...
+ ///
+ virtual const Type *getTypeAtIndex(const Value *V) const ;
+ virtual bool indexValid(const Value *V) const;
+
+ // Implement the AbstractTypeUser interface.
+ virtual void refineAbstractType(const DerivedType *OldTy, const Type *NewTy);
+ virtual void typeBecameConcrete(const DerivedType *AbsTy);
+
+ // Methods for support type inquiry through isa, cast, and dyn_cast:
+ static inline bool classof(const StructType *T) { return true; }
+ static inline bool classof(const Type *T) {
+ return T->getTypeID() == StructTyID;
+ }
+
+ bool isPacked() const { return getSubclassData(); }
+};
+
+
+/// SequentialType - This is the superclass of the array, pointer and packed
+/// type classes. All of these represent "arrays" in memory. The array type
+/// represents a specifically sized array, pointer types are unsized/unknown
+/// size arrays, vector types represent specifically sized arrays that
+/// allow for use of SIMD instructions. SequentialType holds the common
+/// features of all, which stem from the fact that all three lay their
+/// components out in memory identically.
+///
+class SequentialType : public CompositeType {
+ PATypeHandle ContainedType; ///< Storage for the single contained type
+ SequentialType(const SequentialType &); // Do not implement!
+ const SequentialType &operator=(const SequentialType &); // Do not implement!