[WinEH] Don't visit the same catchswitch twice
authorDavid Majnemer <david.majnemer@gmail.com>
Wed, 23 Dec 2015 03:59:04 +0000 (03:59 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Wed, 23 Dec 2015 03:59:04 +0000 (03:59 +0000)
commit0f16f3c826def2829befdbff764ef3d8ada3032c
treeaa85b52889de4a2032901bc724c4fe4b16ade657
parent5a39c0c83b3b07485a09cea2020f78309fb3ce7c
[WinEH] Don't visit the same catchswitch twice

We visited the same catchswitch twice because it was both the child of
another funclet and the predecessor of a cleanuppad.

Instead, change the numbering algorithm to only recurse if the unwind
destination of the inner funclet agrees with the unwind destination of
the catchswitch.

This fixes PR25926.

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