From eb7cd6c88928c617f2395b9e2ec262e4bfb43880 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 9 Oct 2015 23:05:54 +0000 Subject: [SEH] Update SEH codegen tests to use the new IR Also Fix a buglet where SEH tables had ranges that spanned funclets. The remaining tests using the old landingpad IR are preparation tests, and will be deleted along with the old preparation. llvm-svn: 249917 --- llvm/lib/CodeGen/AsmPrinter/WinException.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'llvm/lib/CodeGen/AsmPrinter/WinException.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/WinException.cpp b/llvm/lib/CodeGen/AsmPrinter/WinException.cpp index a5172fdd7d7..63be0daa708 100644 --- a/llvm/lib/CodeGen/AsmPrinter/WinException.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/WinException.cpp @@ -458,6 +458,11 @@ void WinException::emitCSpecificHandlerTable(const MachineFunction *MF) { // the actions that would be taken in that state. This means our tables are // slightly bigger, which is OK. for (const auto &MBB : *MF) { + // Break out before we enter into a finally funclet. + // FIXME: We need to emit separate EH tables for cleanups. + if (MBB.isEHFuncletEntry() && &MBB != MF->begin()) + break; + for (InvokeRange &I : invoke_ranges(FuncInfo, MBB)) { // If this invoke is in the same state as the last invoke and there were // no non-throwing calls between it, extend the range to include both -- cgit v1.2.3