mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 10:53:14 +01:00
Enable function parameter debug info for a wider range of args.
This commit is contained in:
@@ -745,22 +745,15 @@ void DtoDefineFunc(FuncDeclaration* fd)
|
||||
bool refout = vd->storage_class & (STCref | STCout);
|
||||
bool lazy = vd->storage_class & STClazy;
|
||||
|
||||
if (refout)
|
||||
if (!refout && (!DtoIsPassedByRef(vd->type) || lazy))
|
||||
{
|
||||
continue;
|
||||
LLValue* a = irloc->value;
|
||||
LLValue* v = DtoAlloca(a->getType(), "."+a->getName());
|
||||
DtoStore(a,v);
|
||||
irloc->value = v;
|
||||
}
|
||||
else if (!lazy && DtoIsPassedByRef(vd->type))
|
||||
{
|
||||
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;
|
||||
if (global.params.symdebug && !(isaArgument(irloc->value) && !isaArgument(irloc->value)->hasByValAttr()) && !refout)
|
||||
DtoDwarfLocalVariable(irloc->value, vd);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user