comparison gen/functions.cpp @ 1045:a91d6fc600cd

Fixed lazy arguments again.
author Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
date Thu, 05 Mar 2009 18:33:20 +0100
parents 45af482e3832
children 6bb04dbee21f
comparison
equal deleted inserted replaced
1044:39f12f5aa515 1045:a91d6fc600cd
697 bool lazy = vd->storage_class & STClazy; 697 bool lazy = vd->storage_class & STClazy;
698 698
699 if (!refout && (!f->fty->args[i]->byref || lazy)) 699 if (!refout && (!f->fty->args[i]->byref || lazy))
700 { 700 {
701 // alloca a stack slot for this first class value arg 701 // alloca a stack slot for this first class value arg
702 LLValue* mem = DtoAlloca(DtoType(vd->type), vd->ident->toChars()); 702 const LLType* argt;
703 if (lazy)
704 argt = irloc->value->getType();
705 else
706 argt = DtoType(vd->type);
707 LLValue* mem = DtoAlloca(argt, vd->ident->toChars());
703 708
704 // let the abi transform the argument back first 709 // let the abi transform the argument back first
705 DImValue arg_dval(vd->type, irloc->value); 710 DImValue arg_dval(vd->type, irloc->value);
706 f->fty->getParam(vd->type, i, &arg_dval, mem); 711 f->fty->getParam(vd->type, i, &arg_dval, mem);
707 712