Displaying 2 results from an estimated 2 matches for "write_hex64".
Did you mean:
write_hex
2012 May 18
2
[LLVMdev] Fixed with hex numbers with raw_ostream
...tput \arg N as ten char hexadecimal string, including
/// 0x prefix (e.g. 0x12345678 or 0x00000001).
raw_ostream &write_hex32(uint32_t N);
/// write_hex - Output \arg N as 18 char hexadecimal string, including
/// 0x prefix (e.g. 0x0123456789abcdef or 0x0000000000000001).
raw_ostream &write_hex64(uint64_t N);
Is there already some way to do this level of formatting with raw_ostream?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: raw_ostream.patch
Type: application/octet-stream
Size: 2143 bytes
Desc: not available
URL: <http://lists.llvm.org/piperm...
2012 May 18
0
[LLVMdev] Fixed with hex numbers with raw_ostream
...exadecimal string, including
> /// 0x prefix (e.g. 0x12345678 or 0x00000001).
> raw_ostream &write_hex32(uint32_t N);
>
> /// write_hex - Output \arg N as 18 char hexadecimal string, including
> /// 0x prefix (e.g. 0x0123456789abcdef or 0x0000000000000001).
> raw_ostream &write_hex64(uint64_t N);
>
>
> Is there already some way to do this level of formatting with raw_ostream?
You can get the full awesomeness of printf with include/llvm/Support/Format.h:
OS << format("%016" PRIx64, N);
I don't know if there is a significant performance differenc...