[cfe-commits] r104823 - /cfe/trunk/lib/Driver/Tools.cpp

Daniel Dunbar daniel at zuster.org
Wed May 26 23:51:08 PDT 2010


Author: ddunbar
Date: Thu May 27 01:51:08 2010
New Revision: 104823

URL: http://llvm.org/viewvc/llvm-project?rev=104823&view=rev
Log:
Driver: Update -O -> -O2 replacement for addition of -O0 option.

Modified:
    cfe/trunk/lib/Driver/Tools.cpp

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=104823&r1=104822&r2=104823&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu May 27 01:51:08 2010
@@ -1046,7 +1046,8 @@
   if (Arg *A = Args.getLastArg(options::OPT_O_Group)) {
     if (A->getOption().matches(options::OPT_O4))
       CmdArgs.push_back("-O3");
-    else if (A->getValue(Args)[0] == '\0')
+    else if (A->getOption().matches(options::OPT_O) &&
+             A->getValue(Args)[0] == '\0')
       CmdArgs.push_back("-O2");
     else
       A->render(Args, CmdArgs);





More information about the cfe-commits mailing list