mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-01 23:50:43 +03:00
Static ctors/dtors added via template mixins should not be added to modules
that just import a module containing such a mixin.
This commit is contained in:
parent
5471533dd0
commit
f0dc6cb13e
1 changed files with 2 additions and 2 deletions
|
@ -536,13 +536,13 @@ void DtoDeclareFunction(FuncDeclaration* fdecl)
|
|||
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue