Mercurial > projects > ldc
changeset 958:89729c76b8ff
Static ctors/dtors added via template mixins should not be added to modules
that just import a module containing such a mixin.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sun, 15 Feb 2009 14:54:36 +0100 |
parents | 31bbc7f3b817 |
children | 7e669954db7d |
files | gen/functions.cpp |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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); } }