diff gen/tollvm.cpp @ 1582:d8e558087001

Fixed a segfault in ldc2 when compiling synchronized{} blocks.
author Robert Clipsham <robert@octarineparrot.com>
date Sat, 19 Sep 2009 13:05:10 +0100
parents e4f7b5d9c68a
children 9176437d98be
line wrap: on
line diff
--- a/gen/tollvm.cpp	Sat Sep 19 00:44:35 2009 +0100
+++ b/gen/tollvm.cpp	Sat Sep 19 13:05:10 2009 +0100
@@ -874,11 +874,8 @@
     opaque->refineAbstractTypeTo(pa.get());
     pmutex = isaStruct(pa.get());
 
-    if (gIR->module != NULL)
-    {
-    	gIR->mutexType = pmutex;
-    	gIR->module->addTypeName("D_CRITICAL_SECTION", pmutex);
-    }
+    gIR->mutexType = pmutex;
+    gIR->module->addTypeName("D_CRITICAL_SECTION", pmutex);
     return pmutex;
 }