diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-03-07 04:46:18 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-03-07 04:46:18 +0000 |
commit | 18f36d9eac8b425e8cfed389bbbf02c030f26be7 (patch) | |
tree | db4b3f888896100a6d71b8a1fff20485896250ad /lib/Driver/Tools.cpp | |
parent | 47f164e15b9358b51ae65f8249d56842f8750767 (diff) |
Don't produce debug info when given -g. Fixes PR6529.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97897 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index de9bdcc188..bc521008cf 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -929,7 +929,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // Special case debug options to only pass -g to clang. This is // wrong. - if (Args.hasArg(options::OPT_g_Group)) + 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"); Args.AddLastArg(CmdArgs, options::OPT_nostdinc); |