Don't resolve template instances that were instantiated inside static if or statis assert

This commit is contained in:
Alexey Prokhin
2012-02-14 15:17:59 +04:00
parent 1f4cd033ca
commit bb0d51fb98
8 changed files with 20 additions and 3 deletions

View File

@@ -306,6 +306,7 @@ struct TemplateInstance : ScopeDsymbol
Dsymbol *isnested; // if referencing local symbols, this is the context
int errors; // 1 if compiled with errors
int speculative; // 1 if only instantiated with errors gagged
bool ignore; // true if the instance must be ignored when codegen'ing
#ifdef IN_GCC
/* On some targets, it is necessary to know whether a symbol
will be emitted in the output or not before the symbol
@@ -348,7 +349,6 @@ struct TemplateInstance : ScopeDsymbol
AliasDeclaration *isAliasDeclaration();
#if IN_LLVM
// LDC
Module* tmodule; // module from outermost enclosing template instantiation
Module* emittedInModule; // which module this template instance has been emitted in