diff options
Diffstat (limited to 'llvm/lib/Support/raw_ostream.cpp')
-rw-r--r-- | llvm/lib/Support/raw_ostream.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp index 4bea934a4b4..2a9965ecc30 100644 --- a/llvm/lib/Support/raw_ostream.cpp +++ b/llvm/lib/Support/raw_ostream.cpp @@ -171,8 +171,8 @@ raw_ostream &raw_ostream::write_hex(unsigned long long N) { char *CurPtr = EndPtr; while (N) { - uintptr_t x = N % 16; - *--CurPtr = (x < 10 ? '0' + x : 'a' + x - 10); + unsigned char x = static_cast<unsigned char>(N) % 16; + *--CurPtr = hexdigit(x, /*LowerCase*/true); N /= 16; } |