summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SjLjEHPrepare.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-08-24 00:00:23 +0000
committerBill Wendling <isanbard@gmail.com>2011-08-24 00:00:23 +0000
commit3ae96d69ef0695460eb3d046427d22dcda10d9f0 (patch)
tree2bd2b2f60e450dfb3e0b4b020aea4f1776263430 /lib/CodeGen/SjLjEHPrepare.cpp
parentfc8713ff74c2ed83d453057b24c578a0709fc180 (diff)
downloadllvm-3ae96d69ef0695460eb3d046427d22dcda10d9f0.tar.gz
llvm-3ae96d69ef0695460eb3d046427d22dcda10d9f0.tar.bz2
llvm-3ae96d69ef0695460eb3d046427d22dcda10d9f0.tar.xz
Add the sentinal "no handle" value to the ResumeInst.
A value of -1 at a call site tells the personality function that this call isn't handled by the current function. Since the ResumeInsts are converted to calls to _Unwind_SjLj_Resume, add a (volatile) store of -1 to its 'call site'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138416 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SjLjEHPrepare.cpp')
-rw-r--r--lib/CodeGen/SjLjEHPrepare.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/SjLjEHPrepare.cpp b/lib/CodeGen/SjLjEHPrepare.cpp
index be491b1383..ebed3d2b88 100644
--- a/lib/CodeGen/SjLjEHPrepare.cpp
+++ b/lib/CodeGen/SjLjEHPrepare.cpp
@@ -631,6 +631,8 @@ bool SjLjEHPass::insertSjLjEHSupport(Function &F) {
if (Callee != SelectorFn && Callee != ExceptionFn
&& !CI->doesNotThrow())
insertCallSiteStore(CI, -1, CallSite);
+ } else if (ResumeInst *RI = dyn_cast<ResumeInst>(I)) {
+ insertCallSiteStore(RI, -1, CallSite);
}
}