[WinEH] Generate .xdata for catch handlers
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 31 Mar 2015 22:35:44 +0000 (22:35 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 31 Mar 2015 22:35:44 +0000 (22:35 +0000)
commit64386621ec978386e0238fc16990861c5d4d98c1
tree70bc02b13b9246547dd8d17c3b7a00d95d3458c1
parent58bc60892efdb823d66caa440a020d41d9dac767
[WinEH] Generate .xdata for catch handlers

This lets us catch exceptions in simple cases.

N.B. Things that do not work include (but are not limited to):
- Throwing from within a catch handler.
- Catching an object with a named catch parameter.
- 'CatchHigh' is fictitious, we aren't sure of its purpose.
- We aren't entirely efficient with regards to the number of EH states
  that we generate.
- IP-to-State tables are sensitive to the order of emission.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233767 91177308-0d34-0410-b5e6-96231b3b80d8
15 files changed:
docs/ExceptionHandling.rst
include/llvm/CodeGen/WinEHFuncInfo.h
include/llvm/IR/Intrinsics.td
include/llvm/MC/MCContext.h
lib/CodeGen/AsmPrinter/Win64Exception.cpp
lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/WinEHPrepare.cpp
lib/IR/Verifier.cpp
lib/MC/MCContext.cpp
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/WinEH/cppeh-catch-unwind.ll
test/CodeGen/WinEH/cppeh-cleanups.ll [deleted file]
test/CodeGen/WinEH/cppeh-prepared-catch.ll [new file with mode: 0644]
test/CodeGen/WinEH/cppeh-prepared-cleanups.ll [new file with mode: 0644]