[SEH] Update SEH codegen tests to use the new IR
[oota-llvm.git] / lib / CodeGen / AsmPrinter / WinException.cpp
index a5172fdd7d731ba159ff44c974fcc6c5dfa9391c..63be0daa708e77a47b6f3e2cde970fa6ef637fb0 100644 (file)
@@ -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