[LLVMdev] 2.4 Pre-release (v1) Available for Testing
clattner at apple.com
Sun Oct 12 10:03:28 PDT 2008
On Oct 12, 2008, at 7:26 AM, Duncan Sands wrote:
>>>> Which makes me curious, if I submitted a patch that got rid of
>>>> use of abort()s all over the place, and replaces them with
>>>> (the program dies either way if it is unhandled, but with
>>>> 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,
> yes, but it currently doesn't always. It takes careful design to
> get a
> system that chugs on merrily in spite of exceptions. LLVM wasn't
> that way. You can of course add code to make it robust - be my guest.
Again, while anyone is welcome to do this, it won't be accepted back
into the main repository. There are better ways of accomplishing this
than exceptions. Exceptions have a huge cost on the whole system and
LLVM has to serve multiple clients well.
More information about the llvm-dev