[cfe-commits] r84254 - /cfe/trunk/lib/Driver/Tools.cpp
Nuno Lopes
nunoplopes at sapo.pt
Fri Oct 16 07:28:07 PDT 2009
Author: nlopes
Date: Fri Oct 16 09:28:06 2009
New Revision: 84254
URL: http://llvm.org/viewvc/llvm-project?rev=84254&view=rev
Log:
fix -ansi in c++: it means -std=c++98
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=84254&r1=84253&r2=84254&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Fri Oct 16 09:28:06 2009
@@ -769,7 +769,10 @@
// option.
if (Arg *Std = Args.getLastArg(options::OPT_std_EQ, options::OPT_ansi)) {
if (Std->getOption().matches(options::OPT_ansi))
- CmdArgs.push_back("-std=c89");
+ if (types::isCXX(InputType))
+ CmdArgs.push_back("-std=c++98");
+ else
+ CmdArgs.push_back("-std=c89");
else
Std->render(Args, CmdArgs);
More information about the cfe-commits
mailing list