OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3db1f7b
)
[APInt] Use std::end to avoid mentioning the size of a local buffer repeatedly.
author
Craig Topper
<craig.topper@gmail.com>
Wed, 24 May 2017 07:00:55 +0000
(07:00 +0000)
committer
Craig Topper
<craig.topper@gmail.com>
Wed, 24 May 2017 07:00:55 +0000
(07:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303726
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Support/APInt.cpp
patch
|
blob
|
history
diff --git
a/lib/Support/APInt.cpp
b/lib/Support/APInt.cpp
index
2a916b1
..
e9716e3
100644
(file)
--- a/
lib/Support/APInt.cpp
+++ b/
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;
}