Mercurial > projects > ldc
comparison gen/toobj.cpp @ 511:a0b0676e787d
Fixed problem when instantiating a template with private global variables.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Fri, 15 Aug 2008 05:08:33 +0200 |
parents | 9aac7cff8342 |
children | 3c07287765bc |
comparison
equal
deleted
inserted
replaced
510:6aee82889553 | 511:a0b0676e787d |
---|---|
619 } | 619 } |
620 | 620 |
621 // global variable or magic | 621 // global variable or magic |
622 if (isDataseg()) | 622 if (isDataseg()) |
623 { | 623 { |
624 Logger::println("data segment"); | |
625 | |
624 // we don't want to touch private static members at all !!! | 626 // we don't want to touch private static members at all !!! |
625 if ((prot() == PROTprivate) && getModule() != gIR->dmodule) | 627 // template instances should always be emitted |
628 if (!DtoIsTemplateInstance(this) && prot() == PROTprivate && getModule() != gIR->dmodule) | |
626 return; | 629 return; |
627 | 630 |
628 // don't duplicate work | 631 // don't duplicate work |
629 if (this->ir.resolved) return; | 632 if (this->ir.resolved) return; |
630 this->ir.resolved = true; | 633 this->ir.resolved = true; |