public:
static const PointerType *get(LLVMContext &Context) {
static const PointerType *const result =
- Context.getPointerTypeUnqual(TypeBuilder<T,cross>::get(Context));
+ PointerType::getUnqual(TypeBuilder<T,cross>::get(Context));
return result;
}
};
public:
static const ArrayType *get(LLVMContext &Context) {
static const ArrayType *const result =
- Context.getArrayType(TypeBuilder<T, cross>::get(Context), N);
+ ArrayType::get(TypeBuilder<T, cross>::get(Context), N);
return result;
}
};
public:
static const ArrayType *get(LLVMContext &Context) {
static const ArrayType *const result =
- Context.getArrayType(TypeBuilder<T, cross>::get(Context), 0);
+ ArrayType::get(TypeBuilder<T, cross>::get(Context), 0);
return result;
}
};
public: \
static const IntegerType *get(LLVMContext &Context) { \
static const IntegerType *const result = \
- Context.getIntegerType(sizeof(T) * CHAR_BIT); \
+ IntegerType::get(sizeof(T) * CHAR_BIT); \
return result; \
} \
}; \
class TypeBuilder<types::i<num_bits>, cross> {
public:
static const IntegerType *get(LLVMContext &Context) {
- static const IntegerType *const result = Context.getIntegerType(num_bits);
+ static const IntegerType *const result = IntegerType::get(num_bits);
return result;
}
};
private:
static const FunctionType *create(LLVMContext &Context) {
- return Context.getFunctionType(TypeBuilder<R, cross>::get(Context), false);
+ return FunctionType::get(TypeBuilder<R, cross>::get(Context), false);
}
};
template<typename R, typename A1, bool cross> class TypeBuilder<R(A1), cross> {
std::vector<const Type*> params;
params.reserve(1);
params.push_back(TypeBuilder<A1, cross>::get(Context));
- return Context.getFunctionType(TypeBuilder<R, cross>::get(Context),
+ return FunctionType::get(TypeBuilder<R, cross>::get(Context),
params, false);
}
};
params.reserve(2);
params.push_back(TypeBuilder<A1, cross>::get(Context));
params.push_back(TypeBuilder<A2, cross>::get(Context));
- return Context.getFunctionType(TypeBuilder<R, cross>::get(Context),
+ return FunctionType::get(TypeBuilder<R, cross>::get(Context),
params, false);
}
};
params.push_back(TypeBuilder<A1, cross>::get(Context));
params.push_back(TypeBuilder<A2, cross>::get(Context));
params.push_back(TypeBuilder<A3, cross>::get(Context));
- return Context.getFunctionType(TypeBuilder<R, cross>::get(Context),
+ return FunctionType::get(TypeBuilder<R, cross>::get(Context),
params, false);
}
};
params.push_back(TypeBuilder<A2, cross>::get(Context));
params.push_back(TypeBuilder<A3, cross>::get(Context));
params.push_back(TypeBuilder<A4, cross>::get(Context));
- return Context.getFunctionType(TypeBuilder<R, cross>::get(Context),
+ return FunctionType::get(TypeBuilder<R, cross>::get(Context),
params, false);
}
};
params.push_back(TypeBuilder<A3, cross>::get(Context));
params.push_back(TypeBuilder<A4, cross>::get(Context));
params.push_back(TypeBuilder<A5, cross>::get(Context));
- return Context.getFunctionType(TypeBuilder<R, cross>::get(Context),
+ return FunctionType::get(TypeBuilder<R, cross>::get(Context),
params, false);
}
};
private:
static const FunctionType *create(LLVMContext &Context) {
- return Context.getFunctionType(TypeBuilder<R, cross>::get(Context), true);
+ return FunctionType::get(TypeBuilder<R, cross>::get(Context), true);
}
};
template<typename R, typename A1, bool cross>
std::vector<const Type*> params;
params.reserve(1);
params.push_back(TypeBuilder<A1, cross>::get(Context));
- return Context.getFunctionType(TypeBuilder<R, cross>::get(Context),
- params, true);
+ return FunctionType::get(TypeBuilder<R, cross>::get(Context), params, true);
}
};
template<typename R, typename A1, typename A2, bool cross>
params.reserve(2);
params.push_back(TypeBuilder<A1, cross>::get(Context));
params.push_back(TypeBuilder<A2, cross>::get(Context));
- return Context.getFunctionType(TypeBuilder<R, cross>::get(Context),
+ return FunctionType::get(TypeBuilder<R, cross>::get(Context),
params, true);
}
};
params.push_back(TypeBuilder<A1, cross>::get(Context));
params.push_back(TypeBuilder<A2, cross>::get(Context));
params.push_back(TypeBuilder<A3, cross>::get(Context));
- return Context.getFunctionType(TypeBuilder<R, cross>::get(Context),
+ return FunctionType::get(TypeBuilder<R, cross>::get(Context),
params, true);
}
};
params.push_back(TypeBuilder<A2, cross>::get(Context));
params.push_back(TypeBuilder<A3, cross>::get(Context));
params.push_back(TypeBuilder<A4, cross>::get(Context));
- return Context.getFunctionType(TypeBuilder<R, cross>::get(Context),
+ return FunctionType::get(TypeBuilder<R, cross>::get(Context),
params, true);
}
};
params.push_back(TypeBuilder<A3, cross>::get(Context));
params.push_back(TypeBuilder<A4, cross>::get(Context));
params.push_back(TypeBuilder<A5, cross>::get(Context));
- return Context.getFunctionType(TypeBuilder<R, cross>::get(Context),
+ return FunctionType::get(TypeBuilder<R, cross>::get(Context),
params, true);
}
};