[cfe-commits] r75690 - in /cfe/trunk: include/clang/Driver/Options.def lib/Driver/Tools.cpp
Eli Friedman
eli.friedman at gmail.com
Tue Jul 14 14:58:57 PDT 2009
Author: efriedma
Date: Tue Jul 14 16:58:17 2009
New Revision: 75690
URL: http://llvm.org/viewvc/llvm-project?rev=75690&view=rev
Log:
Remove -ftraditional option, which gcc doesn't actually support. Make
using -traditional and -traditional-cpp with clang an error because
it's unsupported in clang and causes a significant change in the
semantics of the language.
Modified:
cfe/trunk/include/clang/Driver/Options.def
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/include/clang/Driver/Options.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.def?rev=75690&r1=75689&r2=75690&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.def (original)
+++ cfe/trunk/include/clang/Driver/Options.def Tue Jul 14 16:58:17 2009
@@ -459,7 +459,6 @@
OPTION("-ftemplate-depth-", ftemplate_depth_, Joined, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fterminated-vtables", fterminated_vtables, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-ftime-report", ftime_report, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-ftraditional", ftraditional, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-ftrapv", ftrapv, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-funit-at-a-time", funit_at_a_time, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-funsigned-bitfields", funsigned_bitfields, Flag, f_Group, INVALID, "", 0, 0, 0)
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=75690&r1=75689&r2=75690&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Tue Jul 14 16:58:17 2009
@@ -597,7 +597,11 @@
if (A->getOption().matches(options::OPT_fno_unit_at_a_time))
D.Diag(clang::diag::err_drv_clang_unsupported) << A->getAsString(Args);
}
-
+
+ if (Arg *A = Args.getLastArg(options::OPT_traditional,
+ options::OPT_traditional_cpp))
+ D.Diag(clang::diag::err_drv_clang_unsupported) << A->getAsString(Args);
+
Args.AddLastArg(CmdArgs, options::OPT_dM);
Args.AddLastArg(CmdArgs, options::OPT_dD);
@@ -1114,7 +1118,6 @@
CmdArgs.push_back("-E");
if (Args.hasArg(options::OPT_traditional) ||
- Args.hasArg(options::OPT_ftraditional) ||
Args.hasArg(options::OPT_traditional_cpp))
CmdArgs.push_back("-traditional-cpp");
@@ -1153,8 +1156,7 @@
types::ID InputType = Inputs[0].getType();
const Arg *A;
- if ((A = Args.getLastArg(options::OPT_traditional)) ||
- (A = Args.getLastArg(options::OPT_ftraditional)))
+ if ((A = Args.getLastArg(options::OPT_traditional)))
D.Diag(clang::diag::err_drv_argument_only_allowed_with)
<< A->getAsString(Args) << "-E";
More information about the cfe-commits
mailing list