Mercurial > projects > ldc
diff gen/functions.cpp @ 752:2d7bcfa68128
Enable function parameter debug info for a wider range of args.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Mon, 03 Nov 2008 15:23:22 +0100 |
parents | 1ae94fb1dbbd |
children | f04dde6e882c |
line wrap: on
line diff
--- a/gen/functions.cpp Mon Nov 03 12:35:29 2008 +0100 +++ b/gen/functions.cpp Mon Nov 03 15:23:22 2008 +0100 @@ -745,22 +745,15 @@ bool refout = vd->storage_class & (STCref | STCout); bool lazy = vd->storage_class & STClazy; - if (refout) - { - continue; - } - else if (!lazy && DtoIsPassedByRef(vd->type)) + if (!refout && (!DtoIsPassedByRef(vd->type) || lazy)) { - LLValue* vdirval = irloc->value; - if (global.params.symdebug && !(isaArgument(vdirval) && !isaArgument(vdirval)->hasByValAttr())) - DtoDwarfLocalVariable(vdirval, vd); - continue; + LLValue* a = irloc->value; + LLValue* v = DtoAlloca(a->getType(), "."+a->getName()); + DtoStore(a,v); + irloc->value = v; } - - LLValue* a = irloc->value; - LLValue* v = DtoAlloca(a->getType(), "."+a->getName()); - DtoStore(a,v); - irloc->value = v; + if (global.params.symdebug && !(isaArgument(irloc->value) && !isaArgument(irloc->value)->hasByValAttr()) && !refout) + DtoDwarfLocalVariable(irloc->value, vd); } }