Siddharth Shankar Swain via llvm-dev
2018-May-01 17:02 UTC
[llvm-dev] Disabling Exception in LLVM
Hi all, Can anyone explain why exceptions are disabled in LLVM, even if some C++ coding standard tells to use exceptions ? Thanks, Siddharth -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180501/ed7903db/attachment-0001.html>
Siddharth, 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: https://www.llvm.org/docs/CodingStandards.html#do-not-use-rtti-or-exceptions <https://www.llvm.org/docs/CodingStandards.html#do-not-use-rtti-or-exceptions> As such LLVM's coding standards prohibit the use of exceptions and RTTI. -Chris> On May 1, 2018, at 10:02 AM, Siddharth Shankar Swain via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi all, > Can anyone explain why exceptions are disabled in LLVM, even if some C++ coding standard tells to use exceptions ? > Thanks, > Siddharth > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180501/49f2c367/attachment.html>
Siddharth Shankar Swain via llvm-dev
2018-May-01 17:38 UTC
[llvm-dev] Disabling Exception in LLVM
Hi Chris, Thanks for answering, Can u clarify on this comment mentioned in https://github.com/Z3Prover/z3/issues/861 . cplusplus no exception support · Issue #861 · Z3Prover/z3 · GitHub - LLVM's *source code* does not use exceptions for performance reasons and so is compiled by default with -fno-exceptions. 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). - 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 -fno-exceptions). flag. Said another way Clang's implementation doesn't use exceptions but Clang itself can compile C++ code with or without exception support. Can anyone clarify on this comment ? Thanks, Siddharth On Tue, May 1, 2018 at 11:02 PM, Chris Bieneman <chris.bieneman at me.com> wrote:> Siddharth, > > 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: > > https://www.llvm.org/docs/CodingStandards.html#do-not- > use-rtti-or-exceptions > > As such LLVM's coding standards prohibit the use of exceptions and RTTI. > > -Chris > > On May 1, 2018, at 10:02 AM, Siddharth Shankar Swain via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > Hi all, > Can anyone explain why exceptions are disabled in LLVM, even if some C++ > coding standard tells to use exceptions ? > Thanks, > Siddharth > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180501/be88b48c/attachment.html>