15 #ifndef LLVM_IR_TYPEBUILDER_H
16 #define LLVM_IR_TYPEBUILDER_H
85 template<
typename T,
bool cross_compilable>
class TypeBuilder {};
91 template<u
int32_t num_bits>
class i {};
159 #define DEFINE_INTEGRAL_TYPEBUILDER(T) \
160 template<> class TypeBuilder<T, false> { \
162 static IntegerType *get(LLVMContext &Context) { \
163 return IntegerType::get(Context, sizeof(T) * CHAR_BIT); \
166 template<> class TypeBuilder<T, true> { \
186 #undef DEFINE_INTEGRAL_TYPEBUILDER
188 template<u
int32_t num_bits,
bool cross>
212 template<
bool cross>
class TypeBuilder<types::ieee_float, cross> {
216 template<
bool cross>
class TypeBuilder<types::ieee_double, cross> {
261 template<
typename R,
typename A1,
bool cross>
class TypeBuilder<R(A1), cross> {
271 template<
typename R,
typename A1,
typename A2,
bool cross>
283 template<
typename R,
typename A1,
typename A2,
typename A3,
bool cross>
297 template<
typename R,
typename A1,
typename A2,
typename A3,
typename A4,
313 template<
typename R,
typename A1,
typename A2,
typename A3,
typename A4,
314 typename A5,
bool cross>
330 template<
typename R,
bool cross>
class TypeBuilder<R(...), cross> {
336 template<
typename R,
typename A1,
bool cross>
346 template<
typename R,
typename A1,
typename A2,
bool cross>
358 template<
typename R,
typename A1,
typename A2,
typename A3,
bool cross>
372 template<
typename R,
typename A1,
typename A2,
typename A3,
typename A4,
388 template<
typename R,
typename A1,
typename A2,
typename A3,
typename A4,
389 typename A5,
bool cross>
static Type * getDoubleTy(LLVMContext &C)
i<N> corresponds to the LLVM IntegerType with N bits.
static Type * getX86_MMXTy(LLVMContext &C)
static Type * getX86_FP80Ty(LLVMContext &C)
static Type * getFloatTy(LLVMContext &C)
static Type * getPPC_FP128Ty(LLVMContext &C)
FunctionType - Class to represent function types.
ArrayType - Class to represent array types.
static FunctionType * get(Type *Result, ArrayRef< Type * > Params, bool isVarArg)
FunctionType::get - This static method is the primary way of constructing a FunctionType.
PointerType - Class to represent pointers.
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important class for using LLVM in a threaded context.
static Type * getVoidTy(LLVMContext &C)
TypeBuilder - This provides a uniform API for looking up types known at compile time.
Class to represent integer types.
static Type * getFP128Ty(LLVMContext &C)
static IntegerType * get(LLVMContext &C, unsigned NumBits)
This static method is the primary way of constructing an IntegerType.
static PointerType * getUnqual(Type *ElementType)
PointerType::getUnqual - This constructs a pointer to an object of the specified type in the generic ...
DEFINE_INTEGRAL_TYPEBUILDER(char)
static ArrayType * get(Type *ElementType, uint64_t NumElements)
ArrayType::get - This static method is the primary way to construct an ArrayType. ...