exception handling and fastcc

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

exception handling and fastcc

Nicolas Ojeda Bar-3
Hello,

I am writing a compiler for a functional language and am using the fastcc calling convention extensibly.  I am now thinking about how to implement exception handling (about which I know close to nothing) and was hoping to use the support for exception handling built-in llvm.

Question: can I use the standard __cxa_throw (and personality function) from C++ and the llvm eh machinery even if I am using fastcc instead of the standard calling convention ? 

Thanks,

Kind regards
Nicolas

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: exception handling and fastcc

Reid Kleckner-2
Yep. I'm pretty sure that will work.

If your exception handling scheme can be described as a class hierarchy, then yes, you can build your own Itanium C++ RTTI tables and pass it to __cxa_throw. If the mapping is too hard, you will have to implement your own EH personality to use in place of __gxx_personality_v0.

On Fri, Jul 31, 2015 at 2:31 PM, Nicolas Ojeda Bar <[hidden email]> wrote:
Hello,

I am writing a compiler for a functional language and am using the fastcc calling convention extensibly.  I am now thinking about how to implement exception handling (about which I know close to nothing) and was hoping to use the support for exception handling built-in llvm.

Question: can I use the standard __cxa_throw (and personality function) from C++ and the llvm eh machinery even if I am using fastcc instead of the standard calling convention ? 

Thanks,

Kind regards
Nicolas

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev