diff gen/llvmhelpers.cpp @ 773:5696a7167b21

Fix RawVarDecl double codegen bug. Thanks to downs for the testcase.
author Christian Kamm <kamm incasoftware de>
date Tue, 18 Nov 2008 18:07:57 +0100
parents f04dde6e882c
children 4adf0f742896
line wrap: on
line diff
--- a/gen/llvmhelpers.cpp	Tue Nov 18 17:14:57 2008 +0100
+++ b/gen/llvmhelpers.cpp	Tue Nov 18 18:07:57 2008 +0100
@@ -1332,6 +1332,10 @@
 
     // we don't handle aliases either
     assert(!var->aliassym);
+        
+    // if this already has storage, it must've been handled already
+    if (var->ir.irLocal && var->ir.irLocal->value)
+        return var->ir.irLocal->value;
 
     // referenced by nested function?
 #if DMDV2