diff gen/llvmhelpers.cpp @ 947:9a10fa839dc5

Switch some getModule to getCompilationModule to make sure templates are emitted in the right module.
author Christian Kamm <kamm incasoftware de>
date Sun, 08 Feb 2009 18:51:32 +0100
parents 1714836f2c0b
children 780530d1cad3
line wrap: on
line diff
--- a/gen/llvmhelpers.cpp	Sun Feb 08 16:50:22 2009 +0100
+++ b/gen/llvmhelpers.cpp	Sun Feb 08 18:51:32 2009 +0100
@@ -1563,9 +1563,10 @@
     Module* M = DtoIsTemplateInstance(s);
     // if it's a template instance, check the instantiating module
     // not the module that defines the template
-    if (M)
+    if (M) {
         return M == gIR->dmodule;
-    return s->getModule() == gIR->dmodule;
+    }
+    return s->getCompilationModule() == gIR->dmodule;
 #endif
 }