comparison gen/functions.cpp @ 449:56265fa07c7d

Fixed problem where global variables did not resolve type before using it.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Fri, 01 Aug 2008 21:54:40 +0200
parents 7a67dedbf933
children 30ef3c7bddca
comparison
equal deleted inserted replaced
447:f7259fa1349c 449:56265fa07c7d
587 VarDeclaration* vd = argsym->isVarDeclaration(); 587 VarDeclaration* vd = argsym->isVarDeclaration();
588 assert(vd); 588 assert(vd);
589 589
590 // FIXME: llvm seems to want an alloca/byval for debug info 590 // FIXME: llvm seems to want an alloca/byval for debug info
591 if (!vd->needsStorage || vd->nestedref || vd->isRef() || vd->isOut()) 591 if (!vd->needsStorage || vd->nestedref || vd->isRef() || vd->isOut())
592 {
593 Logger::println("skipping arg storage for (%s) %s ", vd->loc.toChars(), vd->toChars());
592 continue; 594 continue;
595 }
596 // static array params don't support debug info it seems
597 // probably because they're not passed byval
598 else if (vd->type->toBasetype()->ty == Tsarray)
599 {
600 Logger::println("skipping arg storage for static array (%s) %s ", vd->loc.toChars(), vd->toChars());
601 continue;
602 }
593 // debug info for normal aggr params seem to work fine 603 // debug info for normal aggr params seem to work fine
594 else if (DtoIsPassedByRef(vd->type)) 604 else if (DtoIsPassedByRef(vd->type))
595 { 605 {
606 Logger::println("skipping arg storage for aggregate (%s) %s ", vd->loc.toChars(), vd->toChars());
596 if (global.params.symdebug) 607 if (global.params.symdebug)
597 DtoDwarfLocalVariable(vd->ir.getIrValue(), vd); 608 DtoDwarfLocalVariable(vd->ir.getIrValue(), vd);
598 continue; 609 continue;
599 } 610 }
600 611