[llvm-commits] [PATCH] Improve error handling, supersede cerr+abort
Török Edwin
edwintorok at gmail.com
Thu Jul 2 12:11:24 PDT 2009
On 2009-07-01 18:02, Daniel Dunbar wrote:
> 2009/7/1 Török Edwin <edwintorok at gmail.com>:
>
>>> We don't need this. Assertions "can't happen", so assert(0) really is
>>> unreachable.
>>>
>>>
>> What if assertions are turned off? Should we just remove the calls to
>> abort() after each assert(0)?
>> I thought the abort()s were there after the assert(0) so that the
>> compiler knows that the codepaths
>> never return even with assertions turned off.
>>
>
> The compiler will still know this if we replace such places with a
> report_error call, and report_error is marked noreturn.
>
Yes, llvm_report_error is already marked as noreturn.
Can I commit the patch?
Best regards,
--Edwin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: error_handling2.patch
Type: text/x-diff
Size: 6512 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090702/d1dd43d2/attachment.patch>
More information about the llvm-commits
mailing list