comparison gen/functions.cpp @ 363:4d7495038ae8 trunk

[svn r384] Some minor code cleanups.
author lindquist
date Mon, 14 Jul 2008 21:49:54 +0200
parents 6057fdf797d8
children d8234836b40f
comparison
equal deleted inserted replaced
362:faa03bf92f0d 363:4d7495038ae8
209 const llvm::FunctionType* DtoFunctionType(FuncDeclaration* fdecl) 209 const llvm::FunctionType* DtoFunctionType(FuncDeclaration* fdecl)
210 { 210 {
211 if ((fdecl->llvmInternal == LLVMva_start) || (fdecl->llvmInternal == LLVMva_intrinsic)) { 211 if ((fdecl->llvmInternal == LLVMva_start) || (fdecl->llvmInternal == LLVMva_intrinsic)) {
212 return DtoVaFunctionType(fdecl); 212 return DtoVaFunctionType(fdecl);
213 } 213 }
214
215 // unittest has null type, just build it manually
216 /*if (fdecl->isUnitTestDeclaration()) {
217 std::vector<const LLType*> args;
218 return llvm::FunctionType::get(LLType::VoidTy, args, false);
219 }*/
220 214
221 // type has already been resolved 215 // type has already been resolved
222 if (fdecl->type->ir.type != 0) { 216 if (fdecl->type->ir.type != 0) {
223 return llvm::cast<llvm::FunctionType>(fdecl->type->ir.type->get()); 217 return llvm::cast<llvm::FunctionType>(fdecl->type->ir.type->get());
224 } 218 }