[cfe-dev] RFC: Replace __cxa_begin_catch/__cxa_end_catch with intrinsics

Kaylor, Andrew andrew.kaylor at intel.com
Mon Feb 2 16:03:30 PST 2015


Hi all,

I brought this up last week in an LLVMDev discussion of C++ EH support on Windows, but I thought I should float it again with a subject that would be less likely to be missed by people who don't have a direct interest in Windows support.

I would like to introduce two new intrinsics, llvm.eh.begincatch and llvm.eh.endcatch, to take the place of __cxa_begin_catch and __cxa_end_catch in the IR prior to the CodeGen prepare passes.  For the majority of platforms the intrinsics will be directly mapped to the existing function calls during one of the CodeGen prepare passes.  For MSVC-environment Windows targets there is no equivalent function call to be made, but these intrinsics will be extremely useful during the WinEHPrepare pass as a means of identifying the limits of catch-specific code.

If there is a reason why I should not introduce intrinsics for this purpose, please give me feedback now.  Otherwise, I'm going to begin work on a patch to support this in the back end with the expectation that a corresponding change will be made in the clang front end when the intrinsic support is ready.

Thanks,
Andy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150203/3ddfd094/attachment.html>


More information about the cfe-dev mailing list