[LLVMdev] Outputting hex in DOUT's
Aaron Gray
aaronngray.lists at googlemail.com
Tue Aug 4 17:05:39 PDT 2009
2009/8/5 David Greene <dag at cray.com>
> On Tuesday 04 August 2009 18:24, Chris Lattner wrote:
>
> > The big issue is things like this:
> >
> > DOUT << foo.getName() << "\n";
> >
> > When -debug is disable and even when assertions are turned off,
> > foo.getName() is still called. When you use:
>
> Yep, that's a problem.
>
Right !
>
> > DEBUG(errs() << foo.getName() << "\n");
> >
> > When assertions are turned off, the call doesn't exist. It is also a
> > lot less "magic".
>
> Why doesn't
>
> DEBUG(DOUT << foo.getName() << "\n");
>
> work? That's how I've always done it. A bit redundant perhaps, but it
> works.
>
> In any event, errs() is probably nicer. I'll have to see if I can do some
> of
> the tricks I did with DOUT in these patches. I think so, but I may be
> asking
> questions in the future. :)
>
So I can say
DEBUG( err().write_hex(address); err() << "\n"; );
And can I say :-
DEBUG( err().write_hex(address) << "\n"; );
does it associate like that ?
Sorry I am away from my main computer on a laptop otherwise I would try it
:)
Aaron
>
>
> -Dave
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090805/37be8066/attachment.html>
More information about the llvm-dev
mailing list