Rename -mtrap_function= to -ftrap_function= since it's now a target neutral options.

llvm-svn: 129153
This commit is contained in:
Evan Cheng 2011-04-08 21:37:45 +00:00
parent 74d92c1924
commit 04c9429f34
2 changed files with 9 additions and 13 deletions

View File

@ -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">;

View File

@ -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,