forked from OSchip/llvm-project
parent
686e595d41
commit
52fa32de18
|
@ -420,11 +420,10 @@ raw_ostream &raw_ostream::operator<<(const FormattedNumber &FN) {
|
|||
NumberBuffer[1] = '0';
|
||||
char *EndPtr = NumberBuffer+Width;
|
||||
char *CurPtr = EndPtr;
|
||||
const char A = FN.Upper ? 'A' : 'a';
|
||||
unsigned long long N = FN.HexValue;
|
||||
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, !FN.Upper);
|
||||
N /= 16;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue