[LLVMdev] Outputting hex in DOUT's

Aaron Gray aaronngray.lists at googlemail.com
Wed Aug 5 03:14:22 PDT 2009


2009/8/5 Daniel Dunbar <daniel at zuster.org>

> On Tue, Aug 4, 2009 at 5:05 PM, Aaron
> Gray<aaronngray.lists at googlemail.com> wrote:
> > 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 ?
>
> Yes. You can also use format objects from llvm/Support/Format.h, as in:
> --
> DEBUG(errs() << format("0x%08x", address) << "\n");
>
Nice, thanks,

Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090805/9e0deed0/attachment.html>


More information about the llvm-dev mailing list