>>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 ? Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090804/6614cf39/attachment.html>
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>
2009/8/4 Chris Lattner <clattner at apple.com>> > 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); >Ah, great, thanks, Iwastrying that with DOUT and it was not working. Can I do this in a DEBUG() ? Thanks, Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090804/b4282617/attachment.html>