comparison gen/toir.cpp @ 443:44f08170f4ef

Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn. Reworked the LLVMDC specific pragmas.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Fri, 01 Aug 2008 00:32:06 +0200
parents d8dc221d3db7
children cc40db549aea
comparison
equal deleted inserted replaced
442:76078c8ab5b9 443:44f08170f4ef
756 if (dfnval && dfnval->func) 756 if (dfnval && dfnval->func)
757 { 757 {
758 FuncDeclaration* fndecl = dfnval->func; 758 FuncDeclaration* fndecl = dfnval->func;
759 // va_start instruction 759 // va_start instruction
760 if (fndecl->llvmInternal == LLVMva_start) { 760 if (fndecl->llvmInternal == LLVMva_start) {
761 // TODO 761 // llvm doesn't need the second param hence the override
762 assert(0 && "va_start not yet implemented"); 762 Expression* exp = (Expression*)arguments->data[0];
763 DValue* expv = exp->toElem(p);
764 LLValue* arg = DtoBitCast(expv->getLVal(), getVoidPtrType());
765 return new DImValue(type, gIR->ir->CreateCall(GET_INTRINSIC_DECL(vastart), arg, ""));
763 } 766 }
764 // va_arg instruction 767 // va_arg instruction
765 else if (fndecl->llvmInternal == LLVMva_arg) { 768 else if (fndecl->llvmInternal == LLVMva_arg) {
766 return DtoVaArg(loc, type, (Expression*)arguments->data[0]); 769 return DtoVaArg(loc, type, (Expression*)arguments->data[0]);
767 } 770 }