[WinEH] Update catchrets with cloned successors
authorJoseph Tremoulet <jotrem@microsoft.com>
Sat, 2 Jan 2016 15:22:36 +0000 (15:22 +0000)
committerJoseph Tremoulet <jotrem@microsoft.com>
Sat, 2 Jan 2016 15:22:36 +0000 (15:22 +0000)
commitd5ab13d9660be2ecec4e2ad44ac416e66ba1c413
tree4d78c78fe3b2ead718bc7853c31ae61de03308e3
parent8e6708e2461e61fb667164c7dac9a6bd83e65d6c
[WinEH] Update catchrets with cloned successors

Summary:
Add a pass to update catchrets when their successors get cloned; the
existing pass doesn't catch these because it walks the funclet whose
blocks are being cloned but the catchret is in a child funclet.

Also update the test for removing incoming PHI values; when the
predecessor is a catchret, the relevant color is the catchret's parentPad,
not its block's color.

Reviewers: andrew.w.kaylor, rnk, majnemer

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D15840

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256689 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/WinEHPrepare.cpp
test/CodeGen/WinEH/wineh-cloning.ll