<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">LLVM does not allow the use of exceptions in our code. We do not allow throwing or catching them. That does not mean you cannot compile the code with exceptions enabled, it just means we don't use them.<div class=""><br class=""></div><div class="">Clang is a full C++ compiler. Even though LLVM & Clang do not use exceptions in their implementation, Clang does support compiling C++ code that uses exceptions.</div><div class=""><br class=""></div><div class="">Does this answer your question?</div><div class="">-Chris<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On May 1, 2018, at 10:38 AM, Siddharth Shankar Swain <<a href="mailto:h2015096@pilani.bits-pilani.ac.in" class="">h2015096@pilani.bits-pilani.ac.in</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Chris,<div class="">Thanks for answering, Can u clarify on this comment mentioned in <a href="https://github.com/Z3Prover/z3/issues/861" class="">https://github.com/Z3Prover/z3/issues/861</a> .</div><div class=""><br class=""></div><div class=""> 

     

                                            <span class="">cplusplus no exception support · Issue #861 · Z3Prover/z3 · GitHub</span>                                                                                                                                           <div class="gmail-application-main"><div class=""><div id="gmail-js-repo-pjax-container" class=""><div class="gmail-container gmail-new-discussion-timeline experiment-repo-nav"><div class="gmail-repository-content"><div class="gmail-issues-listing"><div class="gmail-js-issues-results" id="gmail-show_issue"><div class="gmail-clearfix" id="gmail-discussion_bucket"><div class="gmail-js-quote-selection-container gmail-discussion-timeline"><div class="gmail-js-discussion gmail-js-socket-channel"><div class="gmail-js-timeline-progressive-focus-container gmail-js-timeline-item"><div class="gmail-timeline-comment-wrapper"><div class="gmail-js-minimizable-comment-group"><div class="gmail-comment gmail-js-task-list-container gmail-timeline-comment gmail-previewable-edit gmail-unminimized-comment gmail-js-comment" id="gmail-issuecomment-270629415"><div class="edit-comment-hide"><span disabled="" class=""><table class="gmail-d-block"><tbody class="gmail-d-block"><tr class="gmail-d-block"><td class="gmail-d-block gmail-markdown-body gmail-js-comment-body gmail-comment-body"><ul class=""><li class="">LLVM's <strong class="">source code</strong> does not use exceptions for performance reasons and so is compiled by default with <code class="">-fno-exceptions</code>. When using LLVM's libraries via it's C++ interface it is important to match how LLVM was built (i.e. do not mix code built with and without exception support).</li><li class="">The Clang compiler which is built on top of LLVM is also compiled without exceptions by default. However the built Clang can compile C++ code with or without exceptions (using the <code class="">-fno-exceptions</code>). flag. Said another way Clang's implementation doesn't use exceptions but Clang itself can compile C++ code with or without exception support.</li></ul><div class=""><br class=""></div><div class="">Can anyone clarify on this comment ?</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Siddharth</div></td></tr></tbody></table></span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, May 1, 2018 at 11:02 PM, Chris Bieneman <span dir="ltr" class=""><<a href="mailto:chris.bieneman@me.com" target="_blank" class="">chris.bieneman@me.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space" class="">Siddharth,<div class=""><br class=""></div><div class="">I'm not sure what coding standards you refer to when you say "some C++ coding standard". This question is answered in the LLVM Coding Standards document here:</div><div class=""><br class=""></div><div class=""><a href="https://www.llvm.org/docs/CodingStandards.html#do-not-use-rtti-or-exceptions" target="_blank" class="">https://www.llvm.org/docs/<wbr class="">CodingStandards.html#do-not-<wbr class="">use-rtti-or-exceptions</a></div><div class=""><br class=""></div><div class="">As such LLVM's coding standards prohibit the use of exceptions and RTTI.</div><div class=""><br class=""></div><div class="">-Chris<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class=""><div class="h5"><div class="">On May 1, 2018, at 10:02 AM, Siddharth Shankar Swain via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="m_4646234902080641791Apple-interchange-newline"></div></div><div class=""><div class=""><div class="h5"><div dir="ltr" class="">Hi all,<div class="">Can anyone explain why exceptions are disabled in LLVM, even if some C++ coding standard tells to use exceptions ?</div><div class="">Thanks,</div><div class="">Siddharth</div></div></div></div>
______________________________<wbr class="">_________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a><br class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank" class="">http://lists.llvm.org/cgi-bin/<wbr class="">mailman/listinfo/llvm-dev</a><br class=""></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>