mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-27 14:24:40 +00:00
[WinEH] Fill out CatchHigh in the TryBlockMap
Now all fields in the WinEH xdata have been filled out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234067 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -421,11 +421,16 @@ void Win64Exception::emitCXXFrameHandler3Table(const MachineFunction *MF) {
|
||||
|
||||
HandlerMaps.push_back(HandlerMapXData);
|
||||
|
||||
int CatchHigh = -1;
|
||||
for (WinEHHandlerType &HT : TBME.HandlerArray)
|
||||
CatchHigh =
|
||||
std::max(CatchHigh, FuncInfo.CatchHandlerMaxState[HT.Handler]);
|
||||
|
||||
assert(TBME.TryLow <= TBME.TryHigh);
|
||||
assert(TBME.CatchHigh > TBME.TryHigh);
|
||||
assert(CatchHigh > TBME.TryHigh);
|
||||
OS.EmitIntValue(TBME.TryLow, 4); // TryLow
|
||||
OS.EmitIntValue(TBME.TryHigh, 4); // TryHigh
|
||||
OS.EmitIntValue(TBME.CatchHigh, 4); // CatchHigh
|
||||
OS.EmitIntValue(CatchHigh, 4); // CatchHigh
|
||||
OS.EmitIntValue(TBME.HandlerArray.size(), 4); // NumCatches
|
||||
OS.EmitValue(createImageRel32(HandlerMapXData), 4); // HandlerArray
|
||||
}
|
||||
|
Reference in New Issue
Block a user