diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-01-21 00:43:30 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-01-21 00:43:30 +0000 |
commit | e029a6a5ed9917200583f1b613fa55953b4a0784 (patch) | |
tree | 07b77a6a6f4cfc44cf1c3eaaa31fcef9bd4793f2 /llvm/lib/CodeGen/SjLjEHPrepare.cpp | |
parent | 7a77eae2f3d4d2f0ff0ea4b817c24823f4a8b5c6 (diff) | |
download | bcm5719-llvm-e029a6a5ed9917200583f1b613fa55953b4a0784.tar.gz bcm5719-llvm-e029a6a5ed9917200583f1b613fa55953b4a0784.zip |
Make sure that landing pad entries in the EH call site table are in the proper
order for SjLj style exception handling.
llvm-svn: 94055
Diffstat (limited to 'llvm/lib/CodeGen/SjLjEHPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SjLjEHPrepare.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SjLjEHPrepare.cpp b/llvm/lib/CodeGen/SjLjEHPrepare.cpp index 95589331cf4..95b94e6c307 100644 --- a/llvm/lib/CodeGen/SjLjEHPrepare.cpp +++ b/llvm/lib/CodeGen/SjLjEHPrepare.cpp @@ -474,8 +474,10 @@ bool SjLjEHPass::insertSjLjEHSupport(Function &F) { // At this point, we are all set up, update the invoke instructions // to mark their call_site values, and fill in the dispatch switch // accordingly. - for (unsigned i = 0, e = Invokes.size(); i != e; ++i) + for (unsigned i = 0, e = Invokes.size(); i != e; ++i) { + F.setCallSiteNumber(Invokes[i], i+1); markInvokeCallSite(Invokes[i], i+1, CallSite, DispatchSwitch); + } // The front end has likely added calls to _Unwind_Resume. We need // to find those calls and mark the call_site as -1 immediately prior. |