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

David Greene dag at cray.com
Wed Dec 23 15:13:41 PST 2009


On Wednesday 23 December 2009 17:09, Chris Lattner wrote:

> > 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.

But is "assert(0 && "foo");" reasonable code?  I know it's standard LLVM
practice but we shouldn't let ourselves be shackled to something just
because it's always been that way.

Not logging error messages the same way as debug messages reduces 
debuggability by reordering messages.  I'll change it back but I still think 
it's a mistake.

                              -Dave




More information about the llvm-commits mailing list