[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234948 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Kleckner
2015-04-14 21:42:36 +00:00
parent ffc045ab80
commit f49f1560d2
2 changed files with 25 additions and 3 deletions

View File

@@ -344,9 +344,11 @@ void Win64Exception::emitCXXFrameHandler3Table(const MachineFunction *MF) {
}
// 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;