diff 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
line wrap: on
line diff
--- a/gen/functions.cpp	Fri Aug 01 19:54:31 2008 +0200
+++ b/gen/functions.cpp	Fri Aug 01 21:54:40 2008 +0200
@@ -589,10 +589,21 @@
 
             // FIXME: llvm seems to want an alloca/byval for debug info
             if (!vd->needsStorage || vd->nestedref || vd->isRef() || vd->isOut())
+            {
+                Logger::println("skipping arg storage for (%s) %s ", vd->loc.toChars(), vd->toChars());
                 continue;
+            }
+            // static array params don't support debug info it seems
+            // probably because they're not passed byval
+            else if (vd->type->toBasetype()->ty == Tsarray)
+            {
+                Logger::println("skipping arg storage for static array (%s) %s ", vd->loc.toChars(), vd->toChars());
+                continue;
+            }
             // debug info for normal aggr params seem to work fine
             else if (DtoIsPassedByRef(vd->type))
             {
+                Logger::println("skipping arg storage for aggregate (%s) %s ", vd->loc.toChars(), vd->toChars());
                 if (global.params.symdebug)
                     DtoDwarfLocalVariable(vd->ir.getIrValue(), vd);
                 continue;