Reduce default template instantiation depth to 512; we're blowing out

the stack too often with 1024. Fixes <rdar://problem/11678534>.

llvm-svn: 159573
This commit is contained in:
Douglas Gregor
2012-07-02 19:56:23 +00:00
parent cac3b90633
commit 271205cedb
2 changed files with 2 additions and 2 deletions

View File

@@ -2026,7 +2026,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
Opts.AccessControl = !Args.hasArg(OPT_fno_access_control);
Opts.ElideConstructors = !Args.hasArg(OPT_fno_elide_constructors);
Opts.MathErrno = Args.hasArg(OPT_fmath_errno);
Opts.InstantiationDepth = Args.getLastArgIntValue(OPT_ftemplate_depth, 1024,
Opts.InstantiationDepth = Args.getLastArgIntValue(OPT_ftemplate_depth, 512,
Diags);
Opts.ConstexprCallDepth = Args.getLastArgIntValue(OPT_fconstexpr_depth, 512,
Diags);