15 #ifndef LLVM_IR_TYPE_H
16 #define LLVM_IR_TYPE_H
21 #include "llvm/Support/DataTypes.h"
32 class LLVMContextImpl;
34 template<
class GraphType>
struct GraphTraits;
88 uint32_t IDAndSubclassData;
93 : Context(C), IDAndSubclassData(0),
100 IDAndSubclassData = (ID & 0xFF) | (IDAndSubclassData & 0xFFFFFF00);
101 assert(
getTypeID() == ID &&
"TypeID data too large for field");
107 IDAndSubclassData = (IDAndSubclassData & 0xFF) | (val << 8);
109 assert(
getSubclassData() == val &&
"Subclass data too large for field");
290 return isSizedDerivedType();
432 bool isSizedDerivedType()
const;
486 return reinterpret_cast<Type**
>(Tys);
COFF::RelocationTypeX86 Type
struct LLVMOpaqueType * LLVMTypeRef
static Type * getDoubleTy(LLVMContext &C)
static IntegerType * getInt1Ty(LLVMContext &C)
unsigned getStructNumElements() const
Type * getSequentialElementType() const
bool isPrimitiveType() const
unsigned getScalarSizeInBits()
static const fltSemantics IEEEdouble
2: 32-bit floating point type
static NodeType * getEntryNode(Type *T)
bool isDerivedType() const
static PointerType * getInt32PtrTy(LLVMContext &C, unsigned AS=0)
static ChildIteratorType child_begin(NodeType *N)
bool isDoubleTy() const
isDoubleTy - Return true if this is 'double', a 64-bit IEEE fp type.
bool isPtrOrPtrVectorTy() const
int getFPMantissaWidth() const
4: 80-bit floating point type (X87)
LLVMContext ** unwrap(LLVMContextRef *Tys)
subtype_reverse_iterator subtype_rend() const
1: 16-bit floating point type
static IntegerType * getInt64Ty(LLVMContext &C)
static Type * getMetadataTy(LLVMContext &C)
unsigned getPointerAddressSpace() const
Get the address space of this pointer or pointer vector type.
static IntegerType * getInt16Ty(LLVMContext &C)
static Type * getX86_MMXTy(LLVMContext &C)
static PointerType * getX86_MMXPtrTy(LLVMContext &C, unsigned AS=0)
subtype_iterator subtype_end() const
static PointerType * getInt64PtrTy(LLVMContext &C, unsigned AS=0)
static Type * getX86_FP80Ty(LLVMContext &C)
Type *const * ContainedTys
Type * getPointerElementType() const
bool isSingleValueType() const
void print(raw_ostream &O) const
static const fltSemantics x87DoubleExtended
static Type * getFloatTy(LLVMContext &C)
#define llvm_unreachable(msg)
Type * getArrayElementType() const
bool canLosslesslyBitCastTo(Type *Ty) const
Determine if this type could be losslessly bitcast to Ty.
StringRef getStructName() const
static PointerType * getInt16PtrTy(LLVMContext &C, unsigned AS=0)
static const fltSemantics IEEEquad
ID
LLVM Calling Convention Representation.
Type * getVectorElementType() const
Type * getFunctionParamType(unsigned i) const
static Type * getPPC_FP128Ty(LLVMContext &C)
#define DEFINE_ISA_CONVERSION_FUNCTIONS(ty, ref)
static Type * getLabelTy(LLVMContext &C)
LLVMContext & getContext() const
getContext - Return the LLVMContext in which this type was uniqued.
bool isHalfTy() const
isHalfTy - Return true if this is 'half', a 16-bit IEEE fp type.
static bool doit(const Type &Ty)
static PointerType * getDoublePtrTy(LLVMContext &C, unsigned AS=0)
bool isFirstClassType() const
bool isFloatingPointTy() const
unsigned getSubclassData() const
Type(LLVMContext &C, TypeID tid)
bool isPPC_FP128Ty() const
isPPC_FP128Ty - Return true if this is powerpc long double.
10: Arbitrary bit width integers
static ChildIteratorType child_begin(NodeType *N)
unsigned getFunctionNumParams() const
bool isX86_MMXTy() const
isX86_MMXTy - Return true if this is X86 MMX.
bool isIntOrIntVectorTy() const
static ChildIteratorType child_end(NodeType *N)
Type * getContainedType(unsigned i) const
bool isFloatTy() const
isFloatTy - Return true if this is 'float', a 32-bit IEEE fp type.
This file declares a class to represent arbitrary precision floating point values and provide a varie...
static Type * getVoidTy(LLVMContext &C)
6: 128-bit floating point type (two 64-bits, PowerPC)
Integer representation type.
Type::subtype_iterator ChildIteratorType
static PointerType * getPPC_FP128PtrTy(LLVMContext &C, unsigned AS=0)
Type::subtype_iterator ChildIteratorType
unsigned getNumContainedTypes() const
bool isFP128Ty() const
isFP128Ty - Return true if this is 'fp128'.
static PointerType * getFloatPtrTy(LLVMContext &C, unsigned AS=0)
bool isFPOrFPVectorTy() const
PointerType * getPointerTo(unsigned AddrSpace=0)
static PointerType * getInt8PtrTy(LLVMContext &C, unsigned AS=0)
static const fltSemantics IEEEhalf
static Type * getFP128Ty(LLVMContext &C)
static PointerType * getX86_FP80PtrTy(LLVMContext &C, unsigned AS=0)
static Type * getHalfTy(LLVMContext &C)
static const fltSemantics PPCDoubleDouble
static PointerType * getInt1PtrTy(LLVMContext &C, unsigned AS=0)
unsigned getIntegerBitWidth() const
bool isFunctionTy() const
15: SIMD 'packed' format, or other vector type
unsigned getVectorNumElements() const
bool isFunctionVarArg() const
Type *const * subtype_iterator
LLVMContextRef * wrap(const LLVMContext **Tys)
static IntegerType * getIntNTy(LLVMContext &C, unsigned N)
static PointerType * getHalfPtrTy(LLVMContext &C, unsigned AS=0)
static Type * getPrimitiveType(LLVMContext &C, TypeID IDNumber)
getPrimitiveType - Return a type based on an identifier.
const fltSemantics & getFltSemantics() const
static PointerType * getFP128PtrTy(LLVMContext &C, unsigned AS=0)
static const fltSemantics IEEEsingle
bool isX86_FP80Ty() const
isX86_FP80Ty - Return true if this is x86 long double.
bool isAggregateType() const
void setTypeID(TypeID ID)
static IntegerType * getInt32Ty(LLVMContext &C)
const Type * getScalarType() const
uint64_t getArrayNumElements() const
unsigned getPrimitiveSizeInBits() const
raw_ostream & operator<<(raw_ostream &OS, const APInt &I)
static PointerType * getIntNPtrTy(LLVMContext &C, unsigned N, unsigned AS=0)
3: 64-bit floating point type
void setSubclassData(unsigned val)
static NodeType * getEntryNode(NodeType *T)
bool isLabelTy() const
isLabelTy - Return true if this is 'label'.
static ChildIteratorType child_end(NodeType *N)
std::reverse_iterator< subtype_iterator > subtype_reverse_iterator
Type * getStructElementType(unsigned N) const
9: MMX vectors (64 bits, X86 specific)
subtype_reverse_iterator subtype_rbegin() const
static IntegerType * getInt8Ty(LLVMContext &C)
subtype_iterator subtype_begin() const
bool isVoidTy() const
isVoidTy - Return true if this is 'void'.
5: 128-bit floating point type (112-bit mantissa)
bool isMetadataTy() const
isMetadataTy - Return true if this is 'metadata'.