RFC: How to represent SEH (__try / __except) in LLVM IR

I want to add SEH support to Clang, which means we need a way to represent it in LLVM IR.

Briefly, this is how I think we should represent it:

  1. Use a different landingpad personality function for SEH (__C_specific_handler / _except_handlerN)
  2. Use filter function pointers in place of type_info globals
  3. Outline cleanups such as destructors and __finally on Windows, and provide a function pointer to the landingpad cleanup clause

See the example IR at the end of this email. Read on if you want to understand why I think this is the right representation.

I can't comment (yet) on the outlined proposal above, but I'll see if I can
get someone to help review. Clang + SEH recently came up in a discussion
and it would be great if others cared too.