mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 23:24:59 +00:00
[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:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user