From 416a5187f7804f37183b46d8f7bf43fa89a9b5a3 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Fri, 17 Apr 2015 17:20:30 +0000 Subject: [PATCH] [WinEH] Allow CatchHigh to be equal to TryHigh Catch blocks which are empty may be in the same state as their try blocks. It is not meaningful to give the catch block its own state number in this case because it can't do anything exceptional. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235212 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/Win64Exception.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/AsmPrinter/Win64Exception.cpp b/lib/CodeGen/AsmPrinter/Win64Exception.cpp index f89d36455f4..c5f1df88355 100644 --- a/lib/CodeGen/AsmPrinter/Win64Exception.cpp +++ b/lib/CodeGen/AsmPrinter/Win64Exception.cpp @@ -437,7 +437,7 @@ void Win64Exception::emitCXXFrameHandler3Table(const MachineFunction *MF) { std::max(CatchHigh, FuncInfo.CatchHandlerMaxState[HT.Handler]); assert(TBME.TryLow <= TBME.TryHigh); - assert(CatchHigh > TBME.TryHigh); + assert(CatchHigh >= TBME.TryHigh); OS.EmitIntValue(TBME.TryLow, 4); // TryLow OS.EmitIntValue(TBME.TryHigh, 4); // TryHigh OS.EmitIntValue(CatchHigh, 4); // CatchHigh -- 2.34.1