Mercurial > projects > ldc
comparison 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 |
comparison
equal
deleted
inserted
replaced
751:dc8b8b7ea0c1 | 752:2d7bcfa68128 |
---|---|
743 assert(irloc); | 743 assert(irloc); |
744 | 744 |
745 bool refout = vd->storage_class & (STCref | STCout); | 745 bool refout = vd->storage_class & (STCref | STCout); |
746 bool lazy = vd->storage_class & STClazy; | 746 bool lazy = vd->storage_class & STClazy; |
747 | 747 |
748 if (refout) | 748 if (!refout && (!DtoIsPassedByRef(vd->type) || lazy)) |
749 { | 749 { |
750 continue; | 750 LLValue* a = irloc->value; |
751 LLValue* v = DtoAlloca(a->getType(), "."+a->getName()); | |
752 DtoStore(a,v); | |
753 irloc->value = v; | |
751 } | 754 } |
752 else if (!lazy && DtoIsPassedByRef(vd->type)) | 755 if (global.params.symdebug && !(isaArgument(irloc->value) && !isaArgument(irloc->value)->hasByValAttr()) && !refout) |
753 { | 756 DtoDwarfLocalVariable(irloc->value, vd); |
754 LLValue* vdirval = irloc->value; | |
755 if (global.params.symdebug && !(isaArgument(vdirval) && !isaArgument(vdirval)->hasByValAttr())) | |
756 DtoDwarfLocalVariable(vdirval, vd); | |
757 continue; | |
758 } | |
759 | |
760 LLValue* a = irloc->value; | |
761 LLValue* v = DtoAlloca(a->getType(), "."+a->getName()); | |
762 DtoStore(a,v); | |
763 irloc->value = v; | |
764 } | 757 } |
765 } | 758 } |
766 | 759 |
767 // need result variable? (nested) | 760 // need result variable? (nested) |
768 if (fd->vresult && fd->vresult->nestedref) { | 761 if (fd->vresult && fd->vresult->nestedref) { |