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

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

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 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.

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.

Does this answer your question?
-Chris

Yes mostly, Thanks for the quick answer.