diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2009-08-05 14:30:52 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2009-08-05 14:30:52 +0000 |
commit | 8e9ef0d87dad25f02e5abc6facf528778236115a (patch) | |
tree | 216307045a9aa9c45c7c0d35ad1d17d12caf6fa2 | |
parent | 091038cbdeab8933720a4b236ab41590fa02d78a (diff) |
Translate -mcmodel=X to -code-model X and pass it to clang-cc. Patch by Pawel Worach!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78190 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Driver/Options.def | 1 | ||||
-rw-r--r-- | lib/Driver/Tools.cpp | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/Driver/Options.def b/include/clang/Driver/Options.def index 406e62dae7..463272227c 100644 --- a/include/clang/Driver/Options.def +++ b/include/clang/Driver/Options.def @@ -503,6 +503,7 @@ OPTION("-m3dnowa", m3dnowa, Flag, m_x86_Features_Group, INVALID, "", 0, 0, 0) 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) diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 69fc722e24..64ed0e8311 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -367,6 +367,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } } + 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) { |