# HG changeset patch # User Tomas Lindquist Olsen # Date 1236274400 -3600 # Node ID a91d6fc600cd64ce63ac5286e689fa938bbe415a # Parent 39f12f5aa515cb5972616201bee7d0b3d56bd560 Fixed lazy arguments again. diff -r 39f12f5aa515 -r a91d6fc600cd gen/functions.cpp --- a/gen/functions.cpp Wed Mar 04 23:17:32 2009 +0100 +++ b/gen/functions.cpp Thu Mar 05 18:33:20 2009 +0100 @@ -699,7 +699,12 @@ if (!refout && (!f->fty->args[i]->byref || lazy)) { // alloca a stack slot for this first class value arg - LLValue* mem = DtoAlloca(DtoType(vd->type), vd->ident->toChars()); + const LLType* argt; + if (lazy) + argt = irloc->value->getType(); + else + argt = DtoType(vd->type); + LLValue* mem = DtoAlloca(argt, vd->ident->toChars()); // let the abi transform the argument back first DImValue arg_dval(vd->type, irloc->value);