summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-11-21 19:36:32 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-11-21 19:36:32 +0000
commit9a56882e53cbe26e201d942cd7d1380879b3af86 (patch)
tree47190003bb529db90af8bb73733450bea760b67f /clang/lib/Driver/Tools.cpp
parentaa2a00db35735930d97983335afe3ea98430332f (diff)
downloadbcm5719-llvm-9a56882e53cbe26e201d942cd7d1380879b3af86.tar.gz
bcm5719-llvm-9a56882e53cbe26e201d942cd7d1380879b3af86.zip
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. llvm-svn: 145045
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 4229987f523..918b4551c57 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/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");
OpenPOWER on IntegriCloud