]> granicus.if.org Git - clang/commitdiff
Driver: Don't forward any -g options to GCC, when using it to drive the
authorDaniel Dunbar <daniel@zuster.org>
Tue, 3 Aug 2010 16:14:14 +0000 (16:14 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 3 Aug 2010 16:14:14 +0000 (16:14 +0000)
assembler.
 - Fixes PR6218, hopefully.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110111 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp

index d1dafe9df3f6e2758f92bead5a55426c5e186708..19a6a92474c9c724012fa2f4822ea39f2e61c422 100644 (file)
@@ -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