diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-01-29 21:03:02 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-01-29 21:03:02 +0000 |
commit | 4a5290e773e70ec2c3b4353a3a4aa7d1a3e3cd66 (patch) | |
tree | 66f626bbe4e83b335088e15dcb5379d5bad01fe6 /lib/Driver/Tools.cpp | |
parent | f88c8e02da48afea6a04091f675af5c4facd99f1 (diff) |
Driver: Don't honor -std-default for C++, this makes it hard to run the gdb test
suite with clang++ enabled.
The right fix here is PR6175, although we would still have to find a different
work around for the gdb test suite.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94838 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 565c13c275..2e7435fa32 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -901,8 +901,14 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, A->render(Args, CmdArgs); } else { // Honor -std-default. - Args.AddAllArgsTranslated(CmdArgs, options::OPT_std_default_EQ, - "-std=", /*Joined=*/true); + // + // FIXME: Clang doesn't correctly handle -std= when the input language + // doesn't match. For the time being just ignore this for C++ inputs; + // eventually we want to do all the standard defaulting here instead of + // splitting it between the driver and clang -cc1. + if (!types::isCXX(InputType)) + Args.AddAllArgsTranslated(CmdArgs, options::OPT_std_default_EQ, + "-std=", /*Joined=*/true); Args.AddLastArg(CmdArgs, options::OPT_trigraphs); } |