[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)
commit71e5676de4d30bbff60f496912db1036f8956430
tree928521c4b8f8d11220ac7bb0eb856a7e1edcd817
parentc47c6ac0a51b62f75cdfcd6ea0d2cb4585408fa3
[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

llvm-svn: 256689
llvm/lib/CodeGen/WinEHPrepare.cpp
llvm/test/CodeGen/WinEH/wineh-cloning.ll