diff dmd/expression.c @ 82:d8dd47ef3973 trunk

[svn r86] Changed the way arguments are given storage. It is now detected if they will need it during semantic passes. Initial support for debug information. Very limited, but MUCH better than nothing :)
author lindquist
date Fri, 02 Nov 2007 01:17:26 +0100
parents a9d29e9f1fed
children 70d6113eeb8c
line wrap: on
line diff
--- a/dmd/expression.c	Thu Nov 01 17:27:18 2007 +0100
+++ b/dmd/expression.c	Fri Nov 02 01:17:26 2007 +0100
@@ -3445,7 +3445,10 @@
 	type = var->type->pointerTo();
     VarDeclaration *v = var->isVarDeclaration();
     if (v)
-	v->checkNestedReference(sc, loc);
+    {
+    v->checkNestedReference(sc, loc);
+    v->llvmNeedsStorage = true;
+    }
     return this;
 }
 
@@ -3589,6 +3592,7 @@
     if (v && v->canassign == 0 &&
         (var->isConst() || (global.params.Dversion > 1 && var->isFinal())))
 	error("cannot modify final variable '%s'", var->toChars());
+    v->llvmNeedsStorage = true;
 
     if (var->isCtorinit())
     {	// It's only modifiable if inside the right constructor