diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-08-03 16:14:14 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-08-03 16:14:14 +0000 |
commit | 939c1211ccd92f263937a0f1fb4e4e9b8d07dcd2 (patch) | |
tree | b0054ce82289c20fcf6ae2d58404104ebf19e341 /clang/lib/Driver/Tools.cpp | |
parent | 758f71af11cdce61891d50fd41a7cc20d20df799 (diff) | |
download | bcm5719-llvm-939c1211ccd92f263937a0f1fb4e4e9b8d07dcd2.tar.gz bcm5719-llvm-939c1211ccd92f263937a0f1fb4e4e9b8d07dcd2.zip |
Driver: Don't forward any -g options to GCC, when using it to drive the
assembler.
- Fixes PR6218, hopefully.
llvm-svn: 110111
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index d1dafe9df3f..19a6a92474c 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/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 |