15 #ifndef LLVM_IR_TYPEBUILDER_H
16 #define LLVM_IR_TYPEBUILDER_H
77 template<
typename T,
bool cross_compilable>
class TypeBuilder {};
83 template<u
int32_t num_bits>
class i {};
98 template<
typename T,
bool cross>
class TypeBuilder<volatile
T, cross>
100 template<
typename T,
bool cross>
class TypeBuilder<const volatile
T, cross>
151 #define DEFINE_INTEGRAL_TYPEBUILDER(T) \
152 template<> class TypeBuilder<T, false> { \
154 static IntegerType *get(LLVMContext &Context) { \
155 return IntegerType::get(Context, sizeof(T) * CHAR_BIT); \
158 template<> class TypeBuilder<T, true> { \
178 #undef DEFINE_INTEGRAL_TYPEBUILDER
180 template<u
int32_t num_bits,
bool cross>
204 template<
bool cross>
class TypeBuilder<types::ieee_float, cross> {
208 template<
bool cross>
class TypeBuilder<types::ieee_double, cross> {
253 template<
typename R,
typename A1,
bool cross>
class TypeBuilder<R(A1), cross> {
263 template<
typename R,
typename A1,
typename A2,
bool cross>
275 template<
typename R,
typename A1,
typename A2,
typename A3,
bool cross>
289 template<
typename R,
typename A1,
typename A2,
typename A3,
typename A4,
305 template<
typename R,
typename A1,
typename A2,
typename A3,
typename A4,
306 typename A5,
bool cross>
322 template<
typename R,
bool cross>
class TypeBuilder<R(...), cross> {
328 template<
typename R,
typename A1,
bool cross>
338 template<
typename R,
typename A1,
typename A2,
bool cross>
350 template<
typename R,
typename A1,
typename A2,
typename A3,
bool cross>
364 template<
typename R,
typename A1,
typename A2,
typename A3,
typename A4,
380 template<
typename R,
typename A1,
typename A2,
typename A3,
typename A4,
381 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)
static FunctionType * get(Type *Result, ArrayRef< Type * > Params, bool isVarArg)
static Type * getVoidTy(LLVMContext &C)
Integer representation type.
static Type * getFP128Ty(LLVMContext &C)
static IntegerType * get(LLVMContext &C, unsigned NumBits)
Get or create an IntegerType instance.
static PointerType * getUnqual(Type *ElementType)
DEFINE_INTEGRAL_TYPEBUILDER(char)
static ArrayType * get(Type *ElementType, uint64_t NumElements)