[cfe-dev] [GSoC] "Microsoft Visual C++ ABI support in Clang" proposal

David Chisnall csdavec at swan.ac.uk
Tue Mar 29 02:15:32 PDT 2011


On 29 Mar 2011, at 02:22, Charles Davis wrote:

> Proper EH
> support requires SEH support and is thus beyond the scope of this project.


Not for recent versions of Windows.  C++ EH and SEH have always been slightly orthogonal (although VC++ has supported generating SEH cleanup information for C++ code, as well as pure C++ EH metadata).  

With x86-64, the EH model on Windows is a lot simpler.  It's actually fairly similar to the Itanium model (unwind library, personality function, code in functions for branching on different handles based on value installed by the personality function).  I think it should be possible to support this exception model without any changes / extensions to LLVM IR, although it will obviously require changes in the back end.  

If anyone's interested in working this, Microsoft has actually bothered to document the ABI pretty well this time:

http://msdn.microsoft.com/en-us/library/1eyas8tf.aspx

I don't have a Windows machine, but if anyone is interested in making this work then let me know - I'd like for Objective-C exceptions to be able to use this mechanism on Win64...

David





More information about the cfe-dev mailing list