<div dir="ltr"><div dir="ltr">I don't think llvm.eh.sjlj.setjmp is involved, but the backend does a bunch of preparation in IR in the SjLjEHPrepare pass. Check it out here:<div><a href="https://github.com/llvm-git-prototype/llvm/blob/a845b0985672ee66c1cc8e070ca5d5ac6e89c0c9/llvm/lib/CodeGen/SjLjEHPrepare.cpp">https://github.com/llvm-git-prototype/llvm/blob/a845b0985672ee66c1cc8e070ca5d5ac6e89c0c9/llvm/lib/CodeGen/SjLjEHPrepare.cpp</a></div><div><br></div><div>So, the documentation is true in the sense that LLVM intrinsics are used to set up a context that is compatible with llvm.eh.sjlj.longjmp, which the EH runtime will call. We could update it to indicate that this lowering happens late during codegen to clarify things.</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 24, 2018 at 9:15 AM Yuanfang Chen via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
<a href="http://llvm.org/docs/ExceptionHandling.html#setjmp-longjmp-exception-handling" rel="noreferrer" target="_blank">http://llvm.org/docs/ExceptionHandling.html#setjmp-longjmp-exception-handling</a><br>
says<br>
"Setjmp/Longjmp (SJLJ) based exception handling uses LLVM intrinsics<br>
llvm.eh.sjlj.setjmp and llvm.eh.sjlj.longjmp to handle control flow<br>
for exception handling."<br>
<br>
Is this still true at least for X86?<br>
"clang++ -fsjlj-exceptions -fcxx-exceptions -S -emit-llvm -O1 eh.cpp"<br>
still gives me the usual invoke, landingpad etc..<br>
<br>
Or llvm.eh.sjlj.* are only lowered from corresponding clang builtins?<br>
<br>
Thanks.<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>