diff options
| author | Sylvestre Ledru <sylvestre@debian.org> | 2013-11-11 19:01:05 +0000 |
|---|---|---|
| committer | Sylvestre Ledru <sylvestre@debian.org> | 2013-11-11 19:01:05 +0000 |
| commit | 26386be1837ee7328827d6363071ce91d28d9010 (patch) | |
| tree | d3a62a85239f1ad75253a141b2ea90dee244cbf1 /clang/lib/Driver/Tools.cpp | |
| parent | b89e172ab643281e6189ff1c55769ec028b27994 (diff) | |
| download | bcm5719-llvm-26386be1837ee7328827d6363071ce91d28d9010.tar.gz bcm5719-llvm-26386be1837ee7328827d6363071ce91d28d9010.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: invalid value '20' in '-O20'. Fall back on value '3'
Reviewers: rengolin, hfinkel
Reviewed By: rengolin
CC: cfe-commits, hfinkel, rengolin
Differential Revision: http://llvm-reviews.chandlerc.com/D2125
llvm-svn: 194403
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
| -rw-r--r-- | clang/lib/Driver/Tools.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index c69ad53360f..87ec76350e0 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -2727,7 +2727,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"); |

