18 #ifndef LLVM_IR_DERIVEDTYPES_H
19 #define LLVM_IR_DERIVEDTYPES_H
23 #include "llvm/Support/DataTypes.h"
30 template<
typename T>
class ArrayRef;
114 static bool isValidReturnType(
Type *RetTy);
118 static bool isValidArgumentType(
Type *ArgTy);
153 Type *getTypeAtIndex(
unsigned Idx);
154 bool indexValid(
const Value *V)
const;
155 bool indexValid(
unsigned Idx)
const;
205 void *SymbolTableEntry;
217 bool isPacked =
false);
222 bool isPacked =
false);
229 bool isPacked =
false);
255 bool hasName()
const {
return SymbolTableEntry != 0; }
269 void setBody(
Type *elt1, ...) END_WITH_NULL;
273 static
bool isValidElementType(
Type *ElemTy);
283 bool isLayoutIdentical(
StructType *Other)
const;
333 uint64_t NumElements;
342 static ArrayType *
get(
Type *ElementType, uint64_t NumElements);
346 static bool isValidElementType(
Type *ElemTy);
359 unsigned NumElements;
376 assert(EltBits &&
"Element size must be of a non-zero size");
397 assert((EltBits & 1) == 0 &&
398 "Cannot truncate vector element with odd bit-width");
405 static bool isValidElementType(
Type *ElemTy);
413 return NumElements * getElementType()->getPrimitiveSizeInBits();
442 static bool isValidElementType(
Type *ElemTy);
CompositeType(LLVMContext &C, TypeID tid)
APInt getMask() const
Get a bit mask for this type.
unsigned getNumParams() const
Type::subtype_iterator param_iterator
static bool classof(const Type *T)
Methods for support type inquiry through isa, cast, and dyn_cast.
static PointerType * get(Type *ElementType, unsigned AddressSpace)
unsigned getAddressSpace() const
Return the address space of the Pointer type.
unsigned getBitWidth() const
Get the number of bits in this IntegerType.
static bool classof(const Type *T)
Methods for support type inquiry through isa, cast, and dyn_cast.
static VectorType * getTruncatedElementVectorType(VectorType *VTy)
Type *const * ContainedTys
SequentialType(TypeID TID, Type *ElType)
element_iterator element_end() const
Type::subtype_iterator element_iterator
static bool classof(const Type *T)
Methods for support type inquiry through isa, cast, and dyn_cast.
param_iterator param_end() const
uint64_t getSignBit() const
unsigned getBitWidth() const
Return the number of bits in the Vector type. Returns zero when the vector is a vector of pointers...
LLVMContext & getContext() const
getContext - Return the LLVMContext in which this type was uniqued.
Minimum number of bits that can be specified.
unsigned getNumElements() const
Return the number of elements in the Vector type.
unsigned getSubclassData() const
Type * getElementType() const
10: Arbitrary bit width integers
Type * getParamType(unsigned i) const
Parameter type accessors.
Type * getElementType(unsigned N) const
param_iterator param_begin() const
static bool classof(const Type *T)
Methods for support type inquiry through isa, cast, and dyn_cast.
static VectorType * getInteger(VectorType *VTy)
uint64_t getNumElements() const
static bool classof(const Type *T)
Methods for support type inquiry through isa, cast, and dyn_cast.
Integer representation type.
static IntegerType * get(LLVMContext &C, unsigned NumBits)
Get or create an IntegerType instance.
static PointerType * getUnqual(Type *ElementType)
15: SIMD 'packed' format, or other vector type
Type *const * subtype_iterator
bool hasName() const
hasName - Return true if this is a named struct that has a non-empty name.
static bool classof(const Type *T)
Methods for support type inquiry through isa, cast, and dyn_cast.
static VectorType * getExtendedElementVectorType(VectorType *VTy)
#define LLVM_DELETED_FUNCTION
Class for arbitrary precision integers.
uint64_t getBitMask() const
static bool classof(const Type *T)
Methods for support type inquiry through isa, cast, and dyn_cast.
std::string getName(ID id, ArrayRef< Type * > Tys=None)
bool isPowerOf2ByteWidth() const
Is this a power-of-2 byte-width IntegerType ?
unsigned getPrimitiveSizeInBits() const
static bool classof(const Type *T)
Implement support type inquiry through isa, cast, and dyn_cast.
IntegerType(LLVMContext &C, unsigned NumBits)
void setSubclassData(unsigned val)
Type * getReturnType() const
LLVM Value Representation.
static VectorType * get(Type *ElementType, unsigned NumElements)
unsigned getNumElements() const
Random access to the elements.