diff gen/toir.cpp @ 170:6476da35a0fe trunk

[svn r186] Fixed 'delete this'.
author lindquist
date Tue, 06 May 2008 03:46:43 +0200
parents 2df270e1ba59
children 68a7dd38c03c
line wrap: on
line diff
--- a/gen/toir.cpp	Tue May 06 03:07:21 2008 +0200
+++ b/gen/toir.cpp	Tue May 06 03:46:43 2008 +0200
@@ -1987,7 +1987,8 @@
                 new llvm::FreeInst(val, p->scopebb());
             }
         }
-        new llvm::StoreInst(z, v->getLVal(), p->scopebb());
+        if (!v->isThis())
+            new llvm::StoreInst(z, v->getLVal(), p->scopebb());
     }
     else if (e1type->ty == Tarray) {
         // must be on the heap (correct?)