diff gen/functions.cpp @ 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 9a10fa839dc5
children 2667e3a145be
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);
         }
     }