[cfe-commits] r78190 - in /cfe/trunk: include/clang/Driver/Options.def lib/Driver/Tools.cpp
Benjamin Kramer
benny.kra at googlemail.com
Wed Aug 5 07:31:28 PDT 2009
Author: d0k
Date: Wed Aug 5 09:30:52 2009
New Revision: 78190
URL: http://llvm.org/viewvc/llvm-project?rev=78190&view=rev
Log:
Translate -mcmodel=X to -code-model X and pass it to clang-cc. Patch by Pawel Worach!
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=78190&r1=78189&r2=78190&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.def (original)
+++ cfe/trunk/include/clang/Driver/Options.def Wed Aug 5 09:30:52 2009
@@ -503,6 +503,7 @@
OPTION("-m3dnow", m3dnow, Flag, m_x86_Features_Group, INVALID, "", 0, 0, 0)
OPTION("-m64", m64, Flag, m_Group, INVALID, "d", 0, 0, 0)
OPTION("-march=", march_EQ, Joined, m_Group, INVALID, "d", 0, 0, 0)
+OPTION("-mcmodel=", mcmodel_EQ, Joined, m_Group, INVALID, "d", 0, 0, 0)
OPTION("-mconstant-cfstrings", mconstant_cfstrings, Flag, clang_ignored_m_Group, INVALID, "", 0, 0, 0)
OPTION("-mdynamic-no-pic", mdynamic_no_pic, Joined, m_Group, INVALID, "q", 0, 0, 0)
OPTION("-mfix-and-continue", mfix_and_continue, Flag, clang_ignored_m_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=78190&r1=78189&r2=78190&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Aug 5 09:30:52 2009
@@ -367,6 +367,11 @@
}
}
+ if (Arg *A = Args.getLastArg(options::OPT_mcmodel_EQ)) {
+ CmdArgs.push_back("-code-model");
+ CmdArgs.push_back(A->getValue(Args));
+ }
+
// FIXME: Use iterator.
for (ArgList::const_iterator
it = Args.begin(), ie = Args.end(); it != ie; ++it) {
More information about the cfe-commits
mailing list