[llvm-commits] [PATCH] Improve error handling, supersede cerr+abort
Daniel Dunbar
daniel at zuster.org
Wed Jul 1 08:02:30 PDT 2009
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.
- Daniel
More information about the llvm-commits
mailing list