[PATCH] [WinEH] C++ EH state number fixes

Andy Kaylor andrew.kaylor at intel.com
Thu May 14 19:17:02 PDT 2015


Hi rnk, majnemer,

This patch fixes a number of problems with EH state numbering for C++ exception handling on Windows.  I believe all of the problems addressed here are related to nested landing pads.

- When a handler appeared, then was masked by another handler, then reappeared, two states were created, the base state of the handler was changed (making it out of sync with any states it enclosed) and two non-contiguous try map entries were created for the handler (the runtime doesn't seem to like that).
- When a nested handler should have returned to a block in another handler and that block was otherwise unreachable, it was being incorrectly pruned from the handler.
- When a nested landing pad pushed handlers on the stack that were not used outside that landing pad, they were not being correctly processed and in some cases were not processed at all.

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D9787

Files:
  include/llvm/CodeGen/WinEHFuncInfo.h
  lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
  lib/CodeGen/WinEHPrepare.cpp
  test/CodeGen/WinEH/cppeh-nested-1.ll
  test/CodeGen/WinEH/cppeh-nested-2.ll
  test/CodeGen/WinEH/cppeh-nested-3.ll
  test/CodeGen/WinEH/cppeh-nested-rethrow.ll
  test/CodeGen/WinEH/cppeh-similar-catch-blocks.ll
  test/CodeGen/WinEH/cppeh-state-calc-1.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9787.25839.patch
Type: text/x-patch
Size: 49186 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150515/9840b797/attachment.bin>


More information about the llvm-commits mailing list