<div dir="ltr">In LLVM IR, you would see an `invoke` instruction that calls the appropriate C++ runtime function to set up a C++ exception. It would be __cxa_throw or CxxThrowException on Windows.<div><br></div><div>Since only function calls can throw, this is not a property of the basic block, but a property of individual call instructions.</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, May 16, 2018 at 10:28 AM Dávid Bolvanský 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>For code:</div><div><div style="color:rgb(0,0,0);background-color:rgb(255,255,254)"><div><span style="color:rgb(0,0,255)">try</span> {</div><div> <span style="color:rgb(0,0,255)">throw</span> <span style="color:rgb(9,136,90)">42</span>;</div><div>} <span style="color:rgb(0,0,255)">catch</span>(<span style="color:rgb(0,0,255)">int</span> e){}</div><div><br></div><div>Are there any helpers in LLVM API to give me info that in "try block" there is a throw which will be executed? I am interested in info "yes, this block throws".</div><div><br></div><div>Thank you</div></div></div></div>
_______________________________________________<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>