From 6b3d5a65cb486f46604d12a16831e8a228ee610f Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Wed, 12 May 2010 18:19:55 +0000 Subject: Simplify. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103631 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/Tools.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/Driver/Tools.cpp') diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index f3ec23c3a7..24ec9b9129 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -992,9 +992,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // 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); -- cgit v1.2.3-70-g09d2