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 | 1299819f718475a7b06ea876ffbe0003313e536c (patch) | |
tree | 6a7d06433b090eaa7e4f0699faeedd0a593d027f /clang/lib/Driver | |
parent | 8d9842d43fa289b8f66ee75627338068e2c3df00 (diff) | |
download | bcm5719-llvm-1299819f718475a7b06ea876ffbe0003313e536c.tar.gz bcm5719-llvm-1299819f718475a7b06ea876ffbe0003313e536c.zip |
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.
llvm-svn: 94838
Diffstat (limited to 'clang/lib/Driver')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 565c13c275d..2e7435fa32a 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/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); } |