Create parameter for maximum number of template instantiations.

Currently, the maximum number is hard coded. This PR creates a command line parameter for it.
Requested by bearophile: http://forum.dlang.org/post/tsphogrgyjeqyeadqkds@forum.dlang.org
This commit is contained in:
kai 2014-07-01 20:38:43 +02:00
parent 956f1ff528
commit a22518a7a6
4 changed files with 21 additions and 0 deletions

View file

@ -385,6 +385,12 @@ cl::opt<bool, true> allinst("allinst",
cl::desc("generate code for all template instantiations"),
cl::location(global.params.allInst));
cl::opt<unsigned, true> nestedTemplateDepth("template-depth",
cl::desc("(experimental) set maximum number of nested template instantiations"),
cl::location(global.params.nestedTmpl),
cl::init(500));
static cl::extrahelp footer("\n"
"-d-debug can also be specified without options, in which case it enables all\n"
"debug checks (i.e. (asserts, boundchecks, contracts and invariants) as well\n"