diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-04-08 21:37:45 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-04-08 21:37:45 +0000 |
commit | 49af1f3cedc55726e4a3dd343eb4a8e24eab8439 (patch) | |
tree | 445222d1f8ba6b5adaace075a41b31614a39ae25 | |
parent | b20e442b31287b7e926a118dec36bddc34dbe730 (diff) |
Rename -mtrap_function= to -ftrap_function= since it's now a target neutral options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129153 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Driver/Options.td | 4 | ||||
-rw-r--r-- | lib/Driver/Tools.cpp | 18 |
2 files changed, 9 insertions, 13 deletions
diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 9eac83536b..21492326e8 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -435,6 +435,8 @@ def fthreadsafe_statics : Flag<"-fthreadsafe-statics">, Group<f_Group>; def ftime_report : Flag<"-ftime-report">, Group<f_Group>; def ftrapv : Flag<"-ftrapv">, Group<f_Group>; def ftrapv_handler_EQ : Joined<"-ftrapv-handler=">, Group<f_Group>; +def ftrap_function_EQ : Joined<"-ftrap-function=">, Group<f_Group>, + HelpText<"Issue call to specified function rather than a trap instruction">; def funit_at_a_time : Flag<"-funit-at-a-time">, Group<f_Group>; def funroll_loops : Flag<"-funroll-loops">, Group<f_Group>; def funsigned_bitfields : Flag<"-funsigned-bitfields">, Group<f_Group>; @@ -542,8 +544,6 @@ def mssse3 : Flag<"-mssse3">, Group<m_x86_Features_Group>; def maes : Flag<"-maes">, Group<m_x86_Features_Group>; def mavx : Flag<"-mavx">, Group<m_x86_Features_Group>; def mthumb : Flag<"-mthumb">, Group<m_Group>; -def mtrap_function_EQ : Joined<"-mtrap-function=">, Group<m_Group>, - HelpText<"Issue call to specified function rather than a trap instruction">; def mtune_EQ : Joined<"-mtune=">, Group<m_Group>; def multi__module : Flag<"-multi_module">; def multiply__defined__unused : Separate<"-multiply_defined_unused">; diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 29f8f8356b..fa7896766d 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -605,17 +605,6 @@ void Clang::AddARMTargetArgs(const ArgList &Args, CmdArgs.push_back("-neon"); } - // Forward -mtrap_function= options to the backend. - for (arg_iterator it = Args.filtered_begin(options::OPT_mtrap_function_EQ), - ie = Args.filtered_end(); it != ie; ++it) { - const Arg *A = *it; - A->claim(); - assert(A->getNumValues() == 1 && "-mtrap_function= expects one argument."); - llvm::StringRef FuncName = A->getValue(Args, 0); - CmdArgs.push_back("-backend-option"); - CmdArgs.push_back(Args.MakeArgString("-arm-trap-func=" + FuncName)); - } - // Kernel code has more strict alignment requirements. if (KernelOrKext) { CmdArgs.push_back("-backend-option"); @@ -1462,6 +1451,13 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back(A->getValue(Args)); } + // Forward -ftrap_function= options to the backend. + if (Arg *A = Args.getLastArg(options::OPT_ftrap_function_EQ)) { + llvm::StringRef FuncName = A->getValue(Args); + CmdArgs.push_back("-backend-option"); + CmdArgs.push_back(Args.MakeArgString("-trap-func=" + FuncName)); + } + // -fno-strict-overflow implies -fwrapv if it isn't disabled, but // -fstrict-overflow won't turn off an explicitly enabled -fwrapv. if (Arg *A = Args.getLastArg(options::OPT_fwrapv, |