# HG changeset patch # User Christian Kamm # Date 1234706076 -3600 # Node ID 89729c76b8ffc3eaf09260cb5e96f4f2fa21cb38 # Parent 31bbc7f3b8173a503f70b1691b414c85f68b2f87 Static ctors/dtors added via template mixins should not be added to modules that just import a module containing such a mixin. diff -r 31bbc7f3b817 -r 89729c76b8ff gen/functions.cpp --- a/gen/functions.cpp Sun Feb 15 14:50:33 2009 +0100 +++ b/gen/functions.cpp Sun Feb 15 14:54:36 2009 +0100 @@ -536,13 +536,13 @@ // static ctor if (fdecl->isStaticCtorDeclaration()) { - if (fdecl->getModule() == gIR->dmodule || fdecl->inTemplateInstance()) { + if (mustDefineSymbol(fdecl)) { gIR->ctors.push_back(fdecl); } } // static dtor else if (fdecl->isStaticDtorDeclaration()) { - if (fdecl->getModule() == gIR->dmodule || fdecl->inTemplateInstance()) { + if (mustDefineSymbol(fdecl)) { gIR->dtors.push_back(fdecl); } }