Index: TypeBuilder.h =================================================================== --- TypeBuilder.h +++ TypeBuilder.h @@ -252,155 +252,24 @@ template<> class TypeBuilder : public TypeBuilder*, false> {}; -template class TypeBuilder { +template +class TypeBuilder { public: static FunctionType *get(LLVMContext &Context) { - return FunctionType::get(TypeBuilder::get(Context), false); - } -}; -template class TypeBuilder { -public: - static FunctionType *get(LLVMContext &Context) { - Type *params[] = { - TypeBuilder::get(Context), - }; - return FunctionType::get(TypeBuilder::get(Context), - params, false); - } -}; -template -class TypeBuilder { -public: - static FunctionType *get(LLVMContext &Context) { - Type *params[] = { - TypeBuilder::get(Context), - TypeBuilder::get(Context), - }; - return FunctionType::get(TypeBuilder::get(Context), - params, false); - } -}; -template -class TypeBuilder { -public: - static FunctionType *get(LLVMContext &Context) { - Type *params[] = { - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - }; - return FunctionType::get(TypeBuilder::get(Context), - params, false); - } -}; - -template -class TypeBuilder { -public: - static FunctionType *get(LLVMContext &Context) { - Type *params[] = { - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - }; - return FunctionType::get(TypeBuilder::get(Context), - params, false); - } -}; - -template -class TypeBuilder { -public: - static FunctionType *get(LLVMContext &Context) { - Type *params[] = { - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - }; return FunctionType::get(TypeBuilder::get(Context), - params, false); + {TypeBuilder::get(Context)...}, false); } }; -template class TypeBuilder { +template +class TypeBuilder { public: static FunctionType *get(LLVMContext &Context) { - return FunctionType::get(TypeBuilder::get(Context), true); - } -}; -template -class TypeBuilder { -public: - static FunctionType *get(LLVMContext &Context) { - Type *params[] = { - TypeBuilder::get(Context), - }; - return FunctionType::get(TypeBuilder::get(Context), params, true); - } -}; -template -class TypeBuilder { -public: - static FunctionType *get(LLVMContext &Context) { - Type *params[] = { - TypeBuilder::get(Context), - TypeBuilder::get(Context), - }; return FunctionType::get(TypeBuilder::get(Context), - params, true); - } -}; -template -class TypeBuilder { -public: - static FunctionType *get(LLVMContext &Context) { - Type *params[] = { - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - }; - return FunctionType::get(TypeBuilder::get(Context), - params, true); - } -}; - -template -class TypeBuilder { -public: - static FunctionType *get(LLVMContext &Context) { - Type *params[] = { - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - }; - return FunctionType::get(TypeBuilder::get(Context), - params, true); + {TypeBuilder::get(Context)...}, true); } }; -template -class TypeBuilder { -public: - static FunctionType *get(LLVMContext &Context) { - Type *params[] = { - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - }; - return FunctionType::get(TypeBuilder::get(Context), - params, true); - } -}; } // namespace llvm