summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2012-02-03 06:27:22 +0000
committerBob Wilson <bob.wilson@apple.com>2012-02-03 06:27:22 +0000
commit14adb360a7015dae78c80cd830f6adfe5e1bcabc (patch)
tree3f7383a3be54f486feac4746fafd092c2a7c6538 /clang/lib/Driver/Tools.cpp
parent3b1817d2f5b73a8b23a61e62825e9f0c73604dd4 (diff)
downloadbcm5719-llvm-14adb360a7015dae78c80cd830f6adfe5e1bcabc.tar.gz
bcm5719-llvm-14adb360a7015dae78c80cd830f6adfe5e1bcabc.zip
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. llvm-svn: 149679
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 97c3c69709c..93dcd0d461b 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud