mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-09 22:13:07 +00:00
[Support] Use hexdigit instead of manually coding the same thing. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259762 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
730d9343ca
commit
a7bacb76b2
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user