[EH] Create removeUnwindEdge utility
authorJoseph Tremoulet <jotrem@microsoft.com>
Sun, 27 Sep 2015 01:47:46 +0000 (01:47 +0000)
committerJoseph Tremoulet <jotrem@microsoft.com>
Sun, 27 Sep 2015 01:47:46 +0000 (01:47 +0000)
commit8a43b3fad98540d6a25e85eccee11ae2d82733f3
treea7ede5790e038ab7cdf3ac041f7850e7706c1466
parent2b4fa2c3e789aaca2a938037e736dc72ed2c48b1
[EH] Create removeUnwindEdge utility

Summary:
Factor the code that rewrites invokes to calls and rewrites WinEH
terminators to their "unwind to caller" equivalents into a helper in
Utils/Local, and use it in the three places I'm aware of that need to do
this.

Reviewers: andrew.w.kaylor, majnemer, rnk

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248677 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/Local.h
lib/CodeGen/WinEHPrepare.cpp
lib/Transforms/Utils/Local.cpp
lib/Transforms/Utils/SimplifyCFG.cpp
test/CodeGen/WinEH/wineh-cloning.ll
test/Transforms/SimplifyCFG/wineh-unreachable.ll [new file with mode: 0644]