[WinEH] Avoid emitting xdata tables twice for cleanups

Since adding invokes of llvm.donothing to cleanups, we come here now,
and trivial EH cleanup usage from clang fails to compile.

llvm-svn: 234948
diff --git a/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp b/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
index 39f7875..8cbf340 100644
--- a/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
@@ -344,9 +344,11 @@
   }
 
   // Defer emission until we've visited the parent function and all the catch
-  // handlers.
-  if (ParentF == F || FuncInfo.CatchHandlerMaxState.count(F))
-    ++FuncInfo.NumIPToStateFuncsVisited;
+  // handlers.  Cleanups don't contribute to the ip2state table yet, so don't
+  // count them.
+  if (ParentF != F && !FuncInfo.CatchHandlerMaxState.count(F))
+    return;
+  ++FuncInfo.NumIPToStateFuncsVisited;
   if (FuncInfo.NumIPToStateFuncsVisited != FuncInfo.CatchHandlerMaxState.size())
     return;