diff gen/toir.cpp @ 936:2ebac4750adb

Removed some dead code. Fixed assertion filenames for imported template instances. Fixes #152 .
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Wed, 04 Feb 2009 02:10:23 +0100
parents 5e3bb0c3ea8b
children d96471e8b5e5
line wrap: on
line diff
--- a/gen/toir.cpp	Tue Feb 03 17:27:01 2009 -0700
+++ b/gen/toir.cpp	Wed Feb 04 02:10:23 2009 +0100
@@ -1768,7 +1768,7 @@
 
         // call assert runtime functions
         p->scope() = IRScope(assertbb,endbb);
-        DtoAssert(&loc, msg ? msg->toElem(p) : NULL);
+        DtoAssert(p->func()->decl->getModule(), &loc, msg ? msg->toElem(p) : NULL);
 
         // rewrite the scope
         p->scope() = IRScope(endbb,oldend);
@@ -1943,7 +1943,7 @@
     // FIXME: DMD inserts a trap here... we probably should as well !?!
 
 #if 1
-    DtoAssert(&loc, NULL);
+    DtoAssert(p->func()->decl->getModule(), &loc, NULL);
 #else
     // call the new (?) trap intrinsic
     p->ir->CreateCall(GET_INTRINSIC_DECL(trap),"");