1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[APInt] Use std::end to avoid mentioning the size of a local buffer repeatedly.

llvm-svn: 303726
This commit is contained in:
Craig Topper 2017-05-24 07:00:55 +00:00
parent 7a023e79e3
commit bc96c01cc7

View File

@ -2045,7 +2045,7 @@ void APInt::toString(SmallVectorImpl<char> &Str, unsigned Radix,
if (isSingleWord()) {
char Buffer[65];
char *BufPtr = Buffer+65;
char *BufPtr = std::end(Buffer);
uint64_t N;
if (!Signed) {
@ -2069,7 +2069,7 @@ void APInt::toString(SmallVectorImpl<char> &Str, unsigned Radix,
*--BufPtr = Digits[N % Radix];
N /= Radix;
}
Str.append(BufPtr, Buffer+65);
Str.append(BufPtr, std::end(Buffer));
return;
}