[cfe-dev] Microsoft C++ exception handling.

João Matos ripzonetriton at gmail.com
Fri Jul 27 10:43:28 PDT 2012


I just learned about the inreg LLVM parameter attribute, which seems to do
this.

declare external
void @___CxxFrameHandler3(i32* inreg nocapture) nounwind

@EHFuncInfo = global i32 0, align 4

define void @main() {
  tail call void @___CxxFrameHandler3(i32* @EHFuncInfo)
  ret void
}

generates:

_main:                                  # @main
        movl    $_EHFuncInfo, %eax
        jmp     ____CxxFrameHandler3    # TAILCALL

-- 
João Matos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120727/d1b2459e/attachment.html>


More information about the cfe-dev mailing list