[llvm-commits] [llvm] r92033 - /llvm/trunk/lib/Analysis/IPA/Andersens.cpp

Chris Lattner clattner at apple.com
Wed Dec 23 15:09:54 PST 2009


On Dec 23, 2009, at 3:06 PM, David Greene wrote:

> On Wednesday 23 December 2009 16:56, Chris Lattner wrote:
>
>>> Why not?  If I'm debugging a crash I certainly want to see the error
>>> message
>>> in the context of all the other debug output.  I want to see it at
>>> the end
>>> of the debug output because that's the order it happened in.
>>
>> This is effectively an assertion message, not -debug output.
>
> Sure, but the assert happened for a reason which I as a developer am
> hoping will be explained a bit by the debug output.  Hence I want to
> see the assert message in the context of the debug output.
>
> The whole point of dbgs() is to be able to do a post-mortem on a
> crash with a gigantic input and not spew gigabytes of data to the
> disk.  So I want to know what triggered the crash as well as what
> led up to it.

There should be no difference between:

errs() << "foo";
llvm_unreachable(0);

and:

assert(0 && "foo");

Now you just introduced one.

-Chris




More information about the llvm-commits mailing list