Mercurial > projects > ldc
diff gen/structs.cpp @ 171:95f07e3f8bb9 trunk
[svn r187] Fixed missing definitions of instances of imported struct template declarations.
author | lindquist |
---|---|
date | Tue, 06 May 2008 05:25:53 +0200 |
parents | 2df270e1ba59 |
children | db9890b3fb64 |
line wrap: on
line diff
--- a/gen/structs.cpp Tue May 06 03:46:43 2008 +0200 +++ b/gen/structs.cpp Tue May 06 05:25:53 2008 +0200 @@ -176,6 +176,9 @@ Logger::println("DtoResolveStruct(%s): %s", sd->toChars(), sd->loc.toChars()); LOG_SCOPE; + if (sd->prot() == PROTprivate && sd->getModule() != gIR->dmodule) + Logger::println("using a private struct from outside its module"); + TypeStruct* ts = (TypeStruct*)DtoDType(sd->type); IrStruct* irstruct = new IrStruct(ts); @@ -337,7 +340,7 @@ gIR->irDsymbol[sd].irStruct->init = initvar; gIR->constInitList.push_back(sd); - if (sd->getModule() == gIR->dmodule) + if (DtoIsTemplateInstance(sd) || sd->getModule() == gIR->dmodule) gIR->defineList.push_back(sd); }