[llvm-commits] [PATCH] Make LLVM assertions configurable

Duncan Sands baldrick at free.fr
Sat Jun 12 04:20:26 PDT 2010


Hi Patrick,

> I've created a patch against the latest svn head that makes assertions
> call a user-definable LLVMDie() handler, instead of abort(3). This makes
> bindings able to turn them into exceptions, which is the subject of the
> next patch :)

LLVM is not designed to work with exceptions: no effort is made to ensure
that the internal state is sensible if an exception is raised.  What I am
saying is that if you catch an exception (or otherwise try to soldier on)
when an assertion fires, you won't be able to continue using the LLVM
libraries, at least not with the current module, because in general it will
be in a corrupt state.

Ciao,

Duncan.



More information about the llvm-commits mailing list