OSDN Git Service

Don't emit .seh_handler directives for any cleanup funclets
authorReid Kleckner <rnk@google.com>
Thu, 8 Dec 2016 20:38:46 +0000 (20:38 +0000)
committerReid Kleckner <rnk@google.com>
Thu, 8 Dec 2016 20:38:46 +0000 (20:38 +0000)
commit477e64915fd13bd02868ee23553c2abbdd0a827f
tree3d0807909c8c1cfc63dfc4baf206d409b7803a6e
parent73a6d5ba6ace8f8f141b08ad755d0310a6553ea0
Don't emit .seh_handler directives for any cleanup funclets

We were falsely claiming that we had an LSDA for the relevant EH
personality before this change, which could lead to the EH machinery
interpreting random adjacent data as an LSDA.

Fixes PR31317

This change is safe because cleanups can't contain exception handlers
today. We do these things to maintain that invariant:
- C++ destructors are naturally out-of-line
- __finally blocks are outlined in clang
- LLVM's inliner will not inline EH constructs into cleanups

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289101 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/WinException.cpp
test/CodeGen/X86/seh-catchpad.ll