[WinEH] Fix single-block cleanup coloring
authorJoseph Tremoulet <jotrem@microsoft.com>
Thu, 10 Sep 2015 16:51:25 +0000 (16:51 +0000)
committerJoseph Tremoulet <jotrem@microsoft.com>
Thu, 10 Sep 2015 16:51:25 +0000 (16:51 +0000)
commit883735e75af662c1878bf08537d2c621efa802a0
tree815e07fff6d401deed324b31c42278c597f07b54
parent07a3b97f20bf63f196ce76e8bfa47d129cf6d8c4
[WinEH] Fix single-block cleanup coloring

Summary:
The coloring code in WinEHPrepare queues cleanuprets' successors with the
correct color (the parent one) when it sees their cleanuppad, and so later
when iterating successors knows to skip processing cleanuprets since
they've already been queued.  This latter check was incorrectly under an
'else' condition and so inadvertently was not kicking in for single-block
cleanups.  This change sinks the check out of the 'else' to fix the bug.

Reviewers: majnemer, andrew.w.kaylor, rnk

Subscribers: llvm-commits

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

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