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

Kenneth Boyd zaimoni at zaimoni.com
Sat Oct 11 14:55:43 PDT 2008


OvermindDL1 wrote:
> On Sat, Oct 11, 2008 at 1:24 PM, Kenneth Boyd <zaimoni at zaimoni.com> wrote:
>   
>> /* snip */
>>     
>
> Actually, my biggest issue with llvm (which highly impacts testing as
> well) is the use of abort(), which I have resolved in my local copy by
> just searching for the full word "abort" everywhere and just replacing
> them with exceptions that relay what happened.  ....  Personally I also do not like asserts
> either, as that is indicating you are expecting something bad to
> happen; such a circumstance should have code to handle it, or throw an
> exception.
>   
Well, use release mode to get rid of all of the asserts ;)

The abort() usages are slightly annoying, but (long-term) I would handle 
those by forking LLVM and wrapping them in #ifndef NDEBUG .
> 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), what is the
> chance it would be accepted, especially since I see no usage of
> exceptions at all
I do not have seniority to directly answer this question.  That said, 
this has been proposed within the past three months -- and rejected.  I 
don't recall the exact rationale off-hand.

Kenneth




More information about the llvm-dev mailing list