mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Remove uses of std::vector from TypeBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135906 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
166579e287
commit
6d0ac80d5e
@ -18,7 +18,6 @@
|
||||
#include "llvm/DerivedTypes.h"
|
||||
#include "llvm/LLVMContext.h"
|
||||
#include <limits.h>
|
||||
#include <vector>
|
||||
|
||||
namespace llvm {
|
||||
|
||||
@ -254,9 +253,9 @@ public:
|
||||
template<typename R, typename A1, bool cross> class TypeBuilder<R(A1), cross> {
|
||||
public:
|
||||
static FunctionType *get(LLVMContext &Context) {
|
||||
std::vector<Type*> params;
|
||||
params.reserve(1);
|
||||
params.push_back(TypeBuilder<A1, cross>::get(Context));
|
||||
Type *params[] = {
|
||||
TypeBuilder<A1, cross>::get(Context),
|
||||
};
|
||||
return FunctionType::get(TypeBuilder<R, cross>::get(Context),
|
||||
params, false);
|
||||
}
|
||||
@ -265,10 +264,10 @@ template<typename R, typename A1, typename A2, bool cross>
|
||||
class TypeBuilder<R(A1, A2), cross> {
|
||||
public:
|
||||
static FunctionType *get(LLVMContext &Context) {
|
||||
std::vector<Type*> params;
|
||||
params.reserve(2);
|
||||
params.push_back(TypeBuilder<A1, cross>::get(Context));
|
||||
params.push_back(TypeBuilder<A2, cross>::get(Context));
|
||||
Type *params[] = {
|
||||
TypeBuilder<A1, cross>::get(Context),
|
||||
TypeBuilder<A2, cross>::get(Context),
|
||||
};
|
||||
return FunctionType::get(TypeBuilder<R, cross>::get(Context),
|
||||
params, false);
|
||||
}
|
||||
@ -277,11 +276,11 @@ template<typename R, typename A1, typename A2, typename A3, bool cross>
|
||||
class TypeBuilder<R(A1, A2, A3), cross> {
|
||||
public:
|
||||
static FunctionType *get(LLVMContext &Context) {
|
||||
std::vector<Type*> params;
|
||||
params.reserve(3);
|
||||
params.push_back(TypeBuilder<A1, cross>::get(Context));
|
||||
params.push_back(TypeBuilder<A2, cross>::get(Context));
|
||||
params.push_back(TypeBuilder<A3, cross>::get(Context));
|
||||
Type *params[] = {
|
||||
TypeBuilder<A1, cross>::get(Context),
|
||||
TypeBuilder<A2, cross>::get(Context),
|
||||
TypeBuilder<A3, cross>::get(Context),
|
||||
};
|
||||
return FunctionType::get(TypeBuilder<R, cross>::get(Context),
|
||||
params, false);
|
||||
}
|
||||
@ -292,12 +291,12 @@ template<typename R, typename A1, typename A2, typename A3, typename A4,
|
||||
class TypeBuilder<R(A1, A2, A3, A4), cross> {
|
||||
public:
|
||||
static FunctionType *get(LLVMContext &Context) {
|
||||
std::vector<Type*> params;
|
||||
params.reserve(4);
|
||||
params.push_back(TypeBuilder<A1, cross>::get(Context));
|
||||
params.push_back(TypeBuilder<A2, cross>::get(Context));
|
||||
params.push_back(TypeBuilder<A3, cross>::get(Context));
|
||||
params.push_back(TypeBuilder<A4, cross>::get(Context));
|
||||
Type *params[] = {
|
||||
TypeBuilder<A1, cross>::get(Context),
|
||||
TypeBuilder<A2, cross>::get(Context),
|
||||
TypeBuilder<A3, cross>::get(Context),
|
||||
TypeBuilder<A4, cross>::get(Context),
|
||||
};
|
||||
return FunctionType::get(TypeBuilder<R, cross>::get(Context),
|
||||
params, false);
|
||||
}
|
||||
@ -308,13 +307,13 @@ template<typename R, typename A1, typename A2, typename A3, typename A4,
|
||||
class TypeBuilder<R(A1, A2, A3, A4, A5), cross> {
|
||||
public:
|
||||
static FunctionType *get(LLVMContext &Context) {
|
||||
std::vector<Type*> params;
|
||||
params.reserve(5);
|
||||
params.push_back(TypeBuilder<A1, cross>::get(Context));
|
||||
params.push_back(TypeBuilder<A2, cross>::get(Context));
|
||||
params.push_back(TypeBuilder<A3, cross>::get(Context));
|
||||
params.push_back(TypeBuilder<A4, cross>::get(Context));
|
||||
params.push_back(TypeBuilder<A5, cross>::get(Context));
|
||||
Type *params[] = {
|
||||
TypeBuilder<A1, cross>::get(Context),
|
||||
TypeBuilder<A2, cross>::get(Context),
|
||||
TypeBuilder<A3, cross>::get(Context),
|
||||
TypeBuilder<A4, cross>::get(Context),
|
||||
TypeBuilder<A5, cross>::get(Context),
|
||||
};
|
||||
return FunctionType::get(TypeBuilder<R, cross>::get(Context),
|
||||
params, false);
|
||||
}
|
||||
@ -330,9 +329,9 @@ template<typename R, typename A1, bool cross>
|
||||
class TypeBuilder<R(A1, ...), cross> {
|
||||
public:
|
||||
static FunctionType *get(LLVMContext &Context) {
|
||||
std::vector<Type*> params;
|
||||
params.reserve(1);
|
||||
params.push_back(TypeBuilder<A1, cross>::get(Context));
|
||||
Type *params[] = {
|
||||
TypeBuilder<A1, cross>::get(Context),
|
||||
};
|
||||
return FunctionType::get(TypeBuilder<R, cross>::get(Context), params, true);
|
||||
}
|
||||
};
|
||||
@ -340,10 +339,10 @@ template<typename R, typename A1, typename A2, bool cross>
|
||||
class TypeBuilder<R(A1, A2, ...), cross> {
|
||||
public:
|
||||
static FunctionType *get(LLVMContext &Context) {
|
||||
std::vector<Type*> params;
|
||||
params.reserve(2);
|
||||
params.push_back(TypeBuilder<A1, cross>::get(Context));
|
||||
params.push_back(TypeBuilder<A2, cross>::get(Context));
|
||||
Type *params[] = {
|
||||
TypeBuilder<A1, cross>::get(Context),
|
||||
TypeBuilder<A2, cross>::get(Context),
|
||||
};
|
||||
return FunctionType::get(TypeBuilder<R, cross>::get(Context),
|
||||
params, true);
|
||||
}
|
||||
@ -352,11 +351,11 @@ template<typename R, typename A1, typename A2, typename A3, bool cross>
|
||||
class TypeBuilder<R(A1, A2, A3, ...), cross> {
|
||||
public:
|
||||
static FunctionType *get(LLVMContext &Context) {
|
||||
std::vector<Type*> params;
|
||||
params.reserve(3);
|
||||
params.push_back(TypeBuilder<A1, cross>::get(Context));
|
||||
params.push_back(TypeBuilder<A2, cross>::get(Context));
|
||||
params.push_back(TypeBuilder<A3, cross>::get(Context));
|
||||
Type *params[] = {
|
||||
TypeBuilder<A1, cross>::get(Context),
|
||||
TypeBuilder<A2, cross>::get(Context),
|
||||
TypeBuilder<A3, cross>::get(Context),
|
||||
};
|
||||
return FunctionType::get(TypeBuilder<R, cross>::get(Context),
|
||||
params, true);
|
||||
}
|
||||
@ -367,12 +366,12 @@ template<typename R, typename A1, typename A2, typename A3, typename A4,
|
||||
class TypeBuilder<R(A1, A2, A3, A4, ...), cross> {
|
||||
public:
|
||||
static FunctionType *get(LLVMContext &Context) {
|
||||
std::vector<Type*> params;
|
||||
params.reserve(4);
|
||||
params.push_back(TypeBuilder<A1, cross>::get(Context));
|
||||
params.push_back(TypeBuilder<A2, cross>::get(Context));
|
||||
params.push_back(TypeBuilder<A3, cross>::get(Context));
|
||||
params.push_back(TypeBuilder<A4, cross>::get(Context));
|
||||
Type *params[] = {
|
||||
TypeBuilder<A1, cross>::get(Context),
|
||||
TypeBuilder<A2, cross>::get(Context),
|
||||
TypeBuilder<A3, cross>::get(Context),
|
||||
TypeBuilder<A4, cross>::get(Context),
|
||||
};
|
||||
return FunctionType::get(TypeBuilder<R, cross>::get(Context),
|
||||
params, true);
|
||||
}
|
||||
@ -383,13 +382,13 @@ template<typename R, typename A1, typename A2, typename A3, typename A4,
|
||||
class TypeBuilder<R(A1, A2, A3, A4, A5, ...), cross> {
|
||||
public:
|
||||
static FunctionType *get(LLVMContext &Context) {
|
||||
std::vector<Type*> params;
|
||||
params.reserve(5);
|
||||
params.push_back(TypeBuilder<A1, cross>::get(Context));
|
||||
params.push_back(TypeBuilder<A2, cross>::get(Context));
|
||||
params.push_back(TypeBuilder<A3, cross>::get(Context));
|
||||
params.push_back(TypeBuilder<A4, cross>::get(Context));
|
||||
params.push_back(TypeBuilder<A5, cross>::get(Context));
|
||||
Type *params[] = {
|
||||
TypeBuilder<A1, cross>::get(Context),
|
||||
TypeBuilder<A2, cross>::get(Context),
|
||||
TypeBuilder<A3, cross>::get(Context),
|
||||
TypeBuilder<A4, cross>::get(Context),
|
||||
TypeBuilder<A5, cross>::get(Context),
|
||||
};
|
||||
return FunctionType::get(TypeBuilder<R, cross>::get(Context),
|
||||
params, true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user