From 271205cedbb47988415a09d2ce7813e2d3b038e7 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 2 Jul 2012 19:56:23 +0000 Subject: Reduce default template instantiation depth to 512; we're blowing out the stack too often with 1024. Fixes . llvm-svn: 159573 --- clang/lib/Frontend/CompilerInvocation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 391c2d27a80..943cb20e2dd 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -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); -- cgit v1.2.3