diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-11-21 19:36:32 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-11-21 19:36:32 +0000 |
commit | c18c42345636e2866fed75c7e434fb659d747672 (patch) | |
tree | 31a128be6a47b71082d8ca0dea883dd19a4b77be /lib/Driver/Tools.cpp | |
parent | 1052c1dc52447643dac5484d3a22ab836c781f47 (diff) |
Add driver arguments -ftemplate-depth=N and -fconstexpr-depth=N, with the same
semantics and defaults as the corresponding g++ arguments. The historical g++
argument -ftemplate-depth-N is kept for compatibility, but modern g++ versions
no longer document that option.
Add -cc1 argument -fconstexpr-depth N to implement the corresponding
functionality.
The -ftemplate-depth=N part of this fixes PR9890.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145045 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 4229987f52..918b4551c5 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -1619,11 +1619,17 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } } - if (Arg *A = Args.getLastArg(options::OPT_ftemplate_depth_)) { + if (Arg *A = Args.getLastArg(options::OPT_ftemplate_depth_, + options::OPT_ftemplate_depth_EQ)) { CmdArgs.push_back("-ftemplate-depth"); CmdArgs.push_back(A->getValue(Args)); } + if (Arg *A = Args.getLastArg(options::OPT_fconstexpr_depth_EQ)) { + CmdArgs.push_back("-fconstexpr-depth"); + CmdArgs.push_back(A->getValue(Args)); + } + if (Arg *A = Args.getLastArg(options::OPT_Wlarge_by_value_copy_EQ, options::OPT_Wlarge_by_value_copy_def)) { CmdArgs.push_back("-Wlarge-by-value-copy"); |