Fixed lazy arguments again.

This commit is contained in:
Tomas Lindquist Olsen 2009-03-05 18:33:20 +01:00
parent cc612c7290
commit b8e9d554e5

View file

@ -699,7 +699,12 @@ void DtoDefineFunction(FuncDeclaration* fd)
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);