[LLVMdev] LLVM asserts

Óscar Fuentes ofv at wanadoo.es
Wed Aug 19 16:59:34 PDT 2009


Chris Lattner <clattner at apple.com> writes:

>>>> It's not about recovery, it's about message reporting.  Right now
>>>> the LLVM
>>>> abort messages are formatted completely differently than aborts from
>>>> other
>>>> parts of our compiler.  That's not friendly to users.
>>>
>>> This is what ErrorReporting.h is all about.
>>
>> But asserts and aborts don't go through that, right?  What's needed is
>> a way to get those assert and abort messages out to other compiler
>> components so they have a chance to report them nicely to the user.
>
> assert and abort should never happen, just like a null pointer or  
> garbage pointer dereference should never happen.  How are garbage  
> pointer and asserts different?

Well, an assert says the compiler is broken, but the compiler may be
just another component of a large application. You are thinking on terms
of a traditional edit-run-crash compiler and on this scenario you are
right. No so for a JIT embedded on a server, where it plays a secondary
role and it is not allowed to bring down the server because some random
piece of code uncovers a bug on the compiler or the LLVM backend.

-- 
Óscar




More information about the llvm-dev mailing list