changeset 453:60332cd85308

Fixed regressions
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Sat, 02 Aug 2008 01:23:53 +0200
parents 30ef3c7bddca
children 283d113d4753
files gen/llvmhelpers.cpp
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gen/llvmhelpers.cpp	Sat Aug 02 00:50:39 2008 +0200
+++ b/gen/llvmhelpers.cpp	Sat Aug 02 01:23:53 2008 +0200
@@ -485,6 +485,12 @@
     LLValue* ptr = DtoNestedContext(func);
     assert(ptr && "nested var, but no context");
 
+    // if there is no nestedVar the context itself is what we're after
+    if (!func->ir.irFunc->nestedVar)
+    {
+        return ptr;
+    }
+
     // handle a "normal" nested variable
 
     // we must cast here to be sure. nested classes just have a void*