[WinEH] Remove unreachable blocks before preparation
authorDavid Majnemer <david.majnemer@gmail.com>
Wed, 7 Oct 2015 21:08:25 +0000 (21:08 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Wed, 7 Oct 2015 21:08:25 +0000 (21:08 +0000)
commitfae66468fddb275831b4bfa77316489906271ecc
treef84b1fc75b69d65ee1b2872df60c33df5f4d8fe4
parent10b15bcfb2dc6bd5400627e31cf0c80b383b3cd0
[WinEH] Remove unreachable blocks before preparation

We remove unreachable blocks because it is pointless to consider them
for coloring.  However, we still had stale pointers to these blocks in
some data structures after we removed them from the function.

Instead, remove the unreachable blocks before attempting to do anything
with the function.

This fixes PR25099.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249617 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/WinEHPrepare.cpp
test/CodeGen/WinEH/cppeh-catch-all.ll [deleted file]
test/CodeGen/WinEH/wineh-cloning.ll
test/CodeGen/X86/cppeh-nounwind.ll [deleted file]