summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-12-16 19:06:07 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-12-16 19:06:07 +0000
commitf6f003af6a91d154c050dd20c4a3f18195c5c45e (patch)
treefc0da7140cfb1198ecd71af55518e78cb7a43952 /clang/lib/Driver/Tools.cpp
parente48ee503249329e1c7e0ed68c3d47e161eed04ec (diff)
downloadbcm5719-llvm-f6f003af6a91d154c050dd20c4a3f18195c5c45e.tar.gz
bcm5719-llvm-f6f003af6a91d154c050dd20c4a3f18195c5c45e.zip
C++11 constexpr: Add note stacks containing backtraces if constant evaluation
fails within a call to a constexpr function. Add -fconstexpr-backtrace-limit argument to driver and frontend, to control the maximum number of notes so produced (default 10). Fix APValue printing to be able to pretty-print all APValue types, and move the testing for this functionality from a unittest to a -verify test now that it's visible in clang's output. llvm-svn: 146749
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 60e6d3dd32f..798d787c65e 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -1808,6 +1808,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back(A->getValue(Args));
}
+ if (Arg *A = Args.getLastArg(options::OPT_fconstexpr_backtrace_limit_EQ)) {
+ CmdArgs.push_back("-fconstexpr-backtrace-limit");
+ CmdArgs.push_back(A->getValue(Args));
+ }
+
// Pass -fmessage-length=.
CmdArgs.push_back("-fmessage-length");
if (Arg *A = Args.getLastArg(options::OPT_fmessage_length_EQ)) {
OpenPOWER on IntegriCloud