From 54c3e2cf0cecc0e986440ff75493520c01517aad Mon Sep 17 00:00:00 2001 From: Tomas Lindquist Olsen Date: Thu, 5 Feb 2009 18:17:42 +0100 Subject: [PATCH] Reverted the template instantiation changes from rev [940]. Wasn't safe it seems :( --- gen/llvmhelpers.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gen/llvmhelpers.cpp b/gen/llvmhelpers.cpp index 574692ab..fe95aaaa 100644 --- a/gen/llvmhelpers.cpp +++ b/gen/llvmhelpers.cpp @@ -1558,22 +1558,30 @@ void DtoOverloadedIntrinsicName(TemplateInstance* ti, TemplateDeclaration* td, s 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 }