[SEH] Deal with users of the old lpad for SEH catch-all blocks
authorReid Kleckner <reid@kleckner.net>
Thu, 16 Apr 2015 00:02:04 +0000 (00:02 +0000)
committerReid Kleckner <reid@kleckner.net>
Thu, 16 Apr 2015 00:02:04 +0000 (00:02 +0000)
commitf96076ed80d6664b3826922aadf8835c70c97e49
tree6ec24b78400c69a11bb821dfcc86607c145f0edb
parentcbbeac14f0ddca71f6d8ff91cd05522bd23908e5
[SEH] Deal with users of the old lpad for SEH catch-all blocks

The way we split SEH catch-all blocks can leave some dead EH values
behind at -O0. Try to remove them, and if we fail, replace them all with
undef.

Fixes a crash when removing the old unreachable landingpad which is
still used by extractvalue instructions in the catch-all block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235061 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/WinEHPrepare.cpp
test/CodeGen/WinEH/seh-catch-all.ll [new file with mode: 0644]