changeset 943:95d09451cb59

Reverted the template instantiation changes from rev [940]. Wasn't safe it seems :(
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Thu, 05 Feb 2009 18:17:42 +0100
parents 55559220ad72
children eb310635d80e
files gen/llvmhelpers.cpp
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gen/llvmhelpers.cpp	Wed Feb 04 20:47:27 2009 +0100
+++ b/gen/llvmhelpers.cpp	Thu Feb 05 18:17:42 2009 +0100
@@ -1558,22 +1558,30 @@
 
 bool mustDefineSymbol(Dsymbol* s)
 {
+#if 1
+    return s->getModule() == gIR->dmodule || DtoIsTemplateInstance(s) != NULL;
+#else
     Module* M = DtoIsTemplateInstance(s);
     // if it's a template instance, check the instantiating module
     // not the module that defines the template
     if (M)
         return M == gIR->dmodule;
     return s->getModule() == gIR->dmodule;
+#endif
 }
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
 bool needsTemplateLinkage(Dsymbol* s)
 {
+#if 1
+    return DtoIsTemplateInstance(s) != NULL;
+#else
     Module* M = DtoIsTemplateInstance(s);
     // only return true if the symbol is a template instances
     // and if this instance originated in the current module
     if (M)
         return M == gIR->dmodule;
     return false;
+#endif
 }