[cfe-commits] r103631 - /cfe/trunk/lib/Driver/Tools.cpp
Daniel Dunbar
daniel at zuster.org
Wed May 12 11:19:56 PDT 2010
Author: ddunbar
Date: Wed May 12 13:19:55 2010
New Revision: 103631
URL: http://llvm.org/viewvc/llvm-project?rev=103631&view=rev
Log:
Simplify.
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=103631&r1=103630&r2=103631&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed May 12 13:19:55 2010
@@ -992,9 +992,9 @@
// Special case debug options to only pass -g to clang. This is
// wrong.
Args.ClaimAllArgs(options::OPT_g_Group);
- Arg *Garg = Args.getLastArg(options::OPT_g_Group);
- if (Garg && Garg != Args.getLastArg(options::OPT_g0))
- CmdArgs.push_back("-g");
+ if (Arg *A = Args.getLastArg(options::OPT_g_Group))
+ if (!A->getOption().matches(options::OPT_g0))
+ CmdArgs.push_back("-g");
Args.AddAllArgs(CmdArgs, options::OPT_ffunction_sections);
Args.AddAllArgs(CmdArgs, options::OPT_fdata_sections);
More information about the cfe-commits
mailing list