[cfe-commits] r94838 - /cfe/trunk/lib/Driver/Tools.cpp
Daniel Dunbar
daniel at zuster.org
Fri Jan 29 13:03:02 PST 2010
Author: ddunbar
Date: Fri Jan 29 15:03:02 2010
New Revision: 94838
URL: http://llvm.org/viewvc/llvm-project?rev=94838&view=rev
Log:
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.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=94838&r1=94837&r2=94838&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Fri Jan 29 15:03:02 2010
@@ -901,8 +901,14 @@
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);
}
More information about the cfe-commits
mailing list