diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-05-24 07:00:55 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-05-24 07:00:55 +0000 |
commit | e6a2318573a8425a5c29388f1b9603a86a812303 (patch) | |
tree | c4c058d11b61bd273b0d42e85fe0c73338a349ec /llvm/lib/Support/APInt.cpp | |
parent | 8913015a793e6bbd10e6fde8b71940acd81cf20a (diff) | |
download | bcm5719-llvm-e6a2318573a8425a5c29388f1b9603a86a812303.tar.gz bcm5719-llvm-e6a2318573a8425a5c29388f1b9603a86a812303.zip |
[APInt] Use std::end to avoid mentioning the size of a local buffer repeatedly.
llvm-svn: 303726
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
-rw-r--r-- | llvm/lib/Support/APInt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index 2a916b14bc2..e9716e3b1e8 100644 --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/lib/Support/APInt.cpp @@ -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; } |