[LLVMdev] 2.4 Pre-release (v1) Available for Testing

OvermindDL1 overminddl1 at gmail.com
Sun Oct 12 00:20:27 PDT 2008


On Sun, Oct 12, 2008 at 1:16 AM, Duncan Sands <baldrick at free.fr> wrote:
> Hi,
>
>> Which makes me curious, if I submitted a patch that got rid of llvms
>> use of abort()s all over the place, and replaces them with exceptions
>> (the program dies either way if it is unhandled, but with exceptions
>> you at least get a chance to handle it and recover),
>
> since LLVM may well be left in an inconsistent state internally if
> an exception is thrown, it wouldn't be safe to continue using it
> after catching an exception.

The unwinding should clean things up, and it can be enforced in such a
way so that, for example, the module is destroyed if such a thing
happens.  Useful in my case because either a script compiles, or it
fails and dies (thus returning a message back to the caller saying it
failed, all state information I needed to keep around can be nicely
dumped).  Exceptions are not the only method though, there are others,
but regardless it still needs to not just 'die'...



More information about the llvm-dev mailing list