summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SjLjEHPrepare.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-05-11 01:11:55 +0000
committerBill Wendling <isanbard@gmail.com>2011-05-11 01:11:55 +0000
commit61512ba251097888963a8f07a35605564bcfc537 (patch)
treea59c9cfe4b50794890a67e4f1a1ff6af35fa0bed /lib/CodeGen/SjLjEHPrepare.cpp
parent1cfac8c5348e5f079b3f8e04397c753524a34fb8 (diff)
downloadllvm-61512ba251097888963a8f07a35605564bcfc537.tar.gz
llvm-61512ba251097888963a8f07a35605564bcfc537.tar.bz2
llvm-61512ba251097888963a8f07a35605564bcfc537.tar.xz
Give the 'eh.sjlj.dispatchsetup' intrinsic call the value coming from the setjmp
intrinsic call. This prevents it from being reordered so that it appears *before* the setjmp intrinsic (thus making it completely useless). <rdar://problem/9409683> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131174 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SjLjEHPrepare.cpp')
-rw-r--r--lib/CodeGen/SjLjEHPrepare.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SjLjEHPrepare.cpp b/lib/CodeGen/SjLjEHPrepare.cpp
index 43904a76cf..92970e496c 100644
--- a/lib/CodeGen/SjLjEHPrepare.cpp
+++ b/lib/CodeGen/SjLjEHPrepare.cpp
@@ -520,7 +520,7 @@ bool SjLjEHPass::insertSjLjEHSupport(Function &F) {
// Add a call to dispatch_setup after the setjmp call. This is expanded to any
// target-specific setup that needs to be done.
- CallInst::Create(DispatchSetupFn, "", EntryBB->getTerminator());
+ CallInst::Create(DispatchSetupFn, DispatchVal, "", EntryBB->getTerminator());
// check the return value of the setjmp. non-zero goes to dispatcher.
Value *IsNormal = new ICmpInst(EntryBB->getTerminator(),