[PATCH] D17536: [WinEH] Don't inline an 'unwinds to caller' cleanupret into funclets which locally unwind

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 22 23:24:55 PST 2016

majnemer created this revision.
majnemer added reviewers: JosephTremoulet, andrew.w.kaylor, rnk.
majnemer added a subscriber: llvm-commits.

It is problematic if the inlinee has a cleanupret which unwinds to
caller and we inline it into a call site which doesn't unwind.

If the funclet unwinds anywhere other than to the caller,
then we will give the funclet two unwind destinations.
This will result in a verifier failure.

Seeing as how the caller wasn't an invoke (which would locally unwind)
and that the funclet cannot unwind to caller, we must conclude that an
'unwind to caller' cleanupret is dynamically unreachable.

This fixes PR26698.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17536.48782.patch
Type: text/x-patch
Size: 5110 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160223/13bd1097/attachment.bin>

More information about the llvm-commits mailing list