//
// This file contains the declarations of classes that represent "derived
// types". These are things like "arrays of x" or "structure of x, y, z" or
//
// This file contains the declarations of classes that represent "derived
// types". These are things like "arrays of x" or "structure of x, y, z" or
/// notifyUsesThatTypeBecameConcrete - Notify AbstractTypeUsers of this type
/// that the current type has transitioned from being abstract to being
/// notifyUsesThatTypeBecameConcrete - Notify AbstractTypeUsers of this type
/// that the current type has transitioned from being abstract to being
setSubclassData(NumBits);
}
friend class TypeMap<IntegerValType, IntegerType>;
setSubclassData(NumBits);
}
friend class TypeMap<IntegerValType, IntegerType>;
/// that instance will be returned. Otherwise a new one will be created. Only
/// one instance with a given NumBits value is ever created.
/// @brief Get or create an IntegerType instance.
/// that instance will be returned. Otherwise a new one will be created. Only
/// one instance with a given NumBits value is ever created.
/// @brief Get or create an IntegerType instance.
/// @brief Get the number of bits in this IntegerType
unsigned getBitWidth() const { return getSubclassData(); }
/// @brief Get the number of bits in this IntegerType
unsigned getBitWidth() const { return getSubclassData(); }
friend class TypeMap<StructValType, StructType>;
StructType(const StructType &); // Do not implement
const StructType &operator=(const StructType &); // Do not implement
friend class TypeMap<StructValType, StructType>;
StructType(const StructType &); // Do not implement
const StructType &operator=(const StructType &); // Do not implement
- StructType(const std::vector<const Type*> &Types, bool isPacked);
+ StructType(LLVMContext &C,
+ const std::vector<const Type*> &Types, bool isPacked);
- static StructType *get(const std::vector<const Type*> &Params,
+ static StructType *get(LLVMContext &Context,
+ const std::vector<const Type*> &Params,
- static StructType *get(bool isPacked=false) {
- return get(std::vector<const Type*>(), isPacked);
+ static StructType *get(LLVMContext &Context, bool isPacked=false) {
+ return get(Context, std::vector<const Type*>(), isPacked);
}
/// StructType::get - This static method is a convenience method for
/// creating structure types by specifying the elements as arguments.
/// Note that this method always returns a non-packed struct. To get
/// an empty struct, pass NULL, NULL.
}
/// StructType::get - This static method is a convenience method for
/// creating structure types by specifying the elements as arguments.
/// Note that this method always returns a non-packed struct. To get
/// an empty struct, pass NULL, NULL.
- static StructType *get(const Type *type, ...) END_WITH_NULL;
+ static StructType *get(LLVMContext &Context,
+ const Type *type, ...) END_WITH_NULL;
/// SequentialType - This is the superclass of the array, pointer and vector
/// type classes. All of these represent "arrays" in memory. The array type
/// represents a specifically sized array, pointer types are unsized/unknown
/// SequentialType - This is the superclass of the array, pointer and vector
/// type classes. All of these represent "arrays" in memory. The array type
/// represents a specifically sized array, pointer types are unsized/unknown
SequentialType* this_() { return this; }
protected:
SequentialType(TypeID TID, const Type *ElType)
SequentialType* this_() { return this; }
protected:
SequentialType(TypeID TID, const Type *ElType)
- : CompositeType(TID), ContainedType(ElType, this_()) {
+ : CompositeType(ElType->getContext(), TID), ContainedType(ElType, this_()) {
///
static VectorType *getInteger(const VectorType *VTy) {
unsigned EltBits = VTy->getElementType()->getPrimitiveSizeInBits();
///
static VectorType *getInteger(const VectorType *VTy) {
unsigned EltBits = VTy->getElementType()->getPrimitiveSizeInBits();
///
static VectorType *getExtendedElementVectorType(const VectorType *VTy) {
unsigned EltBits = VTy->getElementType()->getPrimitiveSizeInBits();
///
static VectorType *getExtendedElementVectorType(const VectorType *VTy) {
unsigned EltBits = VTy->getElementType()->getPrimitiveSizeInBits();
unsigned EltBits = VTy->getElementType()->getPrimitiveSizeInBits();
assert((EltBits & 1) == 0 &&
"Cannot truncate vector element with odd bit-width");
unsigned EltBits = VTy->getElementType()->getPrimitiveSizeInBits();
assert((EltBits & 1) == 0 &&
"Cannot truncate vector element with odd bit-width");
OpaqueType(const OpaqueType &); // DO NOT IMPLEMENT
const OpaqueType &operator=(const OpaqueType &); // DO NOT IMPLEMENT
OpaqueType(const OpaqueType &); // DO NOT IMPLEMENT
const OpaqueType &operator=(const OpaqueType &); // DO NOT IMPLEMENT
// Implement support for type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const OpaqueType *) { return true; }
// Implement support for type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const OpaqueType *) { return true; }