Mercurial > projects > ldc
diff 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 |
line wrap: on
line diff
--- a/gen/toobj.cpp Thu Aug 14 06:55:41 2008 +0200 +++ b/gen/toobj.cpp Fri Aug 15 05:08:33 2008 +0200 @@ -621,8 +621,11 @@ // global variable or magic if (isDataseg()) { + Logger::println("data segment"); + // we don't want to touch private static members at all !!! - if ((prot() == PROTprivate) && getModule() != gIR->dmodule) + // template instances should always be emitted + if (!DtoIsTemplateInstance(this) && prot() == PROTprivate && getModule() != gIR->dmodule) return; // don't duplicate work