diff options
author | Sylvestre Ledru <sylvestre@debian.org> | 2016-11-11 17:29:56 +0000 |
---|---|---|
committer | Sylvestre Ledru <sylvestre@debian.org> | 2016-11-11 17:29:56 +0000 |
commit | d340ccc88a25af80a78882fb4d71544ec1f002b4 (patch) | |
tree | a7d60ac4106cb89426861d87efb9a62ada2d2872 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 31ee8130684a0883177a1677ee62ac18f63f98be (diff) | |
download | bcm5719-llvm-d340ccc88a25af80a78882fb4d71544ec1f002b4.tar.gz bcm5719-llvm-d340ccc88a25af80a78882fb4d71544ec1f002b4.zip |
Add a new optimization option -Og
Summary:
Just like gcc, we should have the -Og option as more and more software are using it:
https://llvm.org/bugs/show_bug.cgi?id=20765
Reviewers: echristo, dberlin, dblaikie, keith.walker.arm, rengolin
Subscribers: aprantl, friss, mehdi_amini, RKSimon, probinson, majnemer, cfe-commits
Differential Revision: https://reviews.llvm.org/D24998
llvm-svn: 286602
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 86a3c87ed5c..2bdd40cc995 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -98,6 +98,9 @@ static unsigned getOptimizationLevel(ArgList &Args, InputKind IK, if (S == "s" || S == "z" || S.empty()) return 2; + if (S == "g") + return 1; + return getLastArgIntValue(Args, OPT_O, DefaultOpt, Diags); } |