[llvm-dev] Disabling Exception in LLVM
Siddharth Shankar Swain via llvm-dev
llvm-dev at lists.llvm.org
Tue May 1 10:38:17 PDT 2018
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>
More information about the llvm-dev
mailing list