From 7f5e7144062afcf7b984308f8c540ea22018e228 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Fri, 3 Apr 2015 23:37:34 +0000 Subject: [WinEH] Fill out CatchHigh in the TryBlockMap Now all fields in the WinEH xdata have been filled out. llvm-svn: 234067 --- llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp') diff --git a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp index bfaab9e6b6b..4547906c275 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp @@ -300,11 +300,7 @@ void WinEHNumbering::createTryBlockMapEntry(int TryLow, int TryHigh, WinEHTryBlockMapEntry TBME; TBME.TryLow = TryLow; TBME.TryHigh = TryHigh; - // FIXME: This should be revisited when we want to throw inside a catch - // handler. - TBME.CatchHigh = INT_MAX; assert(TBME.TryLow <= TBME.TryHigh); - assert(TBME.CatchHigh > TBME.TryHigh); for (CatchHandler *CH : Handlers) { WinEHHandlerType HT; if (CH->getSelector()->isNullValue()) { @@ -444,6 +440,8 @@ void WinEHNumbering::calculateStateNumbers(const Function &F) { ActionList.clear(); FuncInfo.LandingPadStateMap[LPI] = currentEHNumber(); } + + FuncInfo.CatchHandlerMaxState[&F] = NextState - 1; } /// clear - Clear out all the function-specific state. This returns this -- cgit v1.2.3