[LLVMdev] Outputting hex in DOUT's

Chris Lattner clattner at apple.com
Tue Aug 4 14:08:07 PDT 2009


On Aug 4, 2009, at 2:04 PM, Aaron Gray wrote:

> >>How do output hex in DOUT's ?
>
> >Please don't use DOUT, please use:
> >
> >  DEBUG(errs() << stuff);
> >
> >instead.
>
> Okay, I will modify my code. But how do I do hexadecimal output ?
>

raw_ostream has a write_hex method.

O << "foo: ";
O.write_hex(42);
...

-Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090804/d1e094ac/attachment.html>


More information about the llvm-dev mailing list