aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-08-03 16:14:14 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-08-03 16:14:14 +0000
commit2dffe2d9d631fefd79d4999f6ffe7ac0d70882b1 (patch)
tree90cf7bb1d7dd55a251d11a2f474b6f2bfeb07105 /lib/Driver/Tools.cpp
parent1d715ac14bf440664fb0d1425ea882274f994f57 (diff)
Driver: Don't forward any -g options to GCC, when using it to drive the
assembler. - Fixes PR6218, hopefully. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110111 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r--lib/Driver/Tools.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index d1dafe9df3..19a6a92474 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -1600,6 +1600,11 @@ void gcc::Common::ConstructJob(Compilation &C, const JobAction &JA,
it = Args.begin(), ie = Args.end(); it != ie; ++it) {
Arg *A = *it;
if (A->getOption().hasForwardToGCC()) {
+ // Don't forward any -g arguments to assembly steps.
+ if (isa<AssembleJobAction>(JA) &&
+ A->getOption().matches(options::OPT_g_Group))
+ continue;
+
// It is unfortunate that we have to claim here, as this means
// we will basically never report anything interesting for
// platforms using a generic gcc, even if we are just using gcc