OSDN Git Service

[WinEH] Fix endpad coloring/numbering
authorJoseph Tremoulet <jotrem@microsoft.com>
Fri, 16 Oct 2015 18:08:16 +0000 (18:08 +0000)
committerJoseph Tremoulet <jotrem@microsoft.com>
Fri, 16 Oct 2015 18:08:16 +0000 (18:08 +0000)
commitbd439c2bc0a70996465a69181e52737a0795d17d
tree064e11a0496a5a9eec3342cfa237604163bb2c7f
parent0ee039816af920f5b0f8d2a32aabe53cde923f59
[WinEH] Fix endpad coloring/numbering

Summary:
When a cleanup's cleanupendpad or cleanupret targets a catchendpad, stop
trying to propagate the cleanup's parent's color to the catchendpad, since
what's needed is the cleanup's grandparent's color and the catchendpad
will get that color from the catchpad linkage already.  We already had
this exclusion for invokes, but were missing it for
cleanupendpad/cleanupret.

Also add a missing line that tags cleanupendpads' states in the
EHPadStateMap, without with lowering invokes that target cleanupendpads
which unwind to other handlers (and so don't have the -1 state) will fail.

This fixes the reduced IR repro in PR25163.

Reviewers: majnemer, andrew.w.kaylor, rnk

Subscribers: llvm-commits

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

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