diff options
author | Bob Wilson <bob.wilson@apple.com> | 2012-02-03 06:27:22 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2012-02-03 06:27:22 +0000 |
commit | 71fd6cc843719cab528a5df0899ad3d15cb9297f (patch) | |
tree | b99c1709e9fcc3c56d6f049f3aced058cbbecd3a /lib/Driver/Tools.cpp | |
parent | a83f4d2315dbeb3914868f1ccb8e74fb2ccdbb0c (diff) |
Fix -ftrap-function fallout from llvm r145714. <rdar://problem/10799325>
That llvm change removed the -trap-func backend option, so that using
-ftrap-function with clang would cause the backend to complain. Fix it
by adding the trap function name to the CodeGenOptions and passing it through
to the TargetOptions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149679 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 97c3c69709..93dcd0d461 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -1947,12 +1947,7 @@ 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)) { - StringRef FuncName = A->getValue(Args); - CmdArgs.push_back("-backend-option"); - CmdArgs.push_back(Args.MakeArgString("-trap-func=" + FuncName)); - } + Args.AddLastArg(CmdArgs, options::OPT_ftrap_function_EQ); // -fno-strict-overflow implies -fwrapv if it isn't disabled, but // -fstrict-overflow won't turn off an explicitly enabled -fwrapv. |