summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre@debian.org>2013-11-15 15:39:14 +0000
committerSylvestre Ledru <sylvestre@debian.org>2013-11-15 15:39:14 +0000
commit6ae39801189b08c6905d68966e3da48d2828b62f (patch)
tree050005ff49b094566b0513de293ef49402c4162c /clang/lib/Driver/Tools.cpp
parent19e7bfdd8df157f72b7b01548f5b38bbc8ef4743 (diff)
downloadbcm5719-llvm-6ae39801189b08c6905d68966e3da48d2828b62f.tar.gz
bcm5719-llvm-6ae39801189b08c6905d68966e3da48d2828b62f.zip
Using an invalid -O falls back on -O3 instead of an error
Summary: Currently with clang: $ clang -O20 foo.c error: invalid value '20' in '-O20' With the patch: $ clang -O20 foo.c warning: optimization level '-O20' is unsupported; using '-O3' instead. 1 warning generated. This matches the gcc behavior (with a warning added) Pass all tests: Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. Testing Time: 94.14s Expected Passes : 6721 Expected Failures : 20 Unsupported Tests : 17 (which was not the case of http://llvm-reviews.chandlerc.com/D2125) Reviewers: chandlerc, rafael, rengolin, hfinkel Reviewed By: rengolin CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2152 llvm-svn: 194817
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index ceef90f171c..f43694de1cb 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -2760,7 +2760,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
// preprocessed inputs and configure concludes that -fPIC is not supported.
Args.ClaimAllArgs(options::OPT_D);
- // Manually translate -O4 to -O3; let clang reject others.
+ // Manually translate -O4 to -O3; let clang fall back on -O3 for others
if (Arg *A = Args.getLastArg(options::OPT_O_Group)) {
if (A->getOption().matches(options::OPT_O4)) {
CmdArgs.push_back("-O3");
OpenPOWER on IntegriCloud