[WinEH] Verify consistent funclet unwind exits
authorJoseph Tremoulet <jotrem@microsoft.com>
Sun, 10 Jan 2016 04:30:02 +0000 (04:30 +0000)
committerJoseph Tremoulet <jotrem@microsoft.com>
Sun, 10 Jan 2016 04:30:02 +0000 (04:30 +0000)
commitc2d8241d67ed0b22c6de6842bd8608f3b962bee9
treef64b0adac5b89dfbf75be4ba0aec176895d6c4e7
parentfe9953a02c963403dd2e2fbda2f4c596cd6a4704
[WinEH] Verify consistent funclet unwind exits

Summary:
A funclet EH pad may be exited by an unwind edge, which may be a
cleanupret exiting its cleanuppad, an invoke exiting a funclet, or an
unwind out of a nested funclet transitively exiting its parent.  Funclet
EH personalities require all such exceptional exits from a given funclet to
have the same unwind destination, and EH preparation / state numbering /
table generation implicitly depends on this.  Formalize it as a rule of
the IR in the LangRef and verifier.

Reviewers: rnk, majnemer, andrew.w.kaylor

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257273 91177308-0d34-0410-b5e6-96231b3b80d8
docs/ExceptionHandling.rst
docs/LangRef.rst
lib/IR/Verifier.cpp
test/CodeGen/WinEH/wineh-no-demotion.ll
test/CodeGen/WinEH/wineh-statenumbering.ll
test/Verifier/invalid-eh.ll