projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
733be51
)
Fix build error on LP64 platforms.
author
Rui Ueyama
<ruiu@google.com>
Tue, 11 Oct 2016 19:28:56 +0000
(19:28 +0000)
committer
Rui Ueyama
<ruiu@google.com>
Tue, 11 Oct 2016 19:28:56 +0000
(19:28 +0000)
llvm-svn: 283922
llvm/lib/Support/NativeFormatting.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Support/NativeFormatting.cpp
b/llvm/lib/Support/NativeFormatting.cpp
index
84f6c39
..
9989488
100644
(file)
--- a/
llvm/lib/Support/NativeFormatting.cpp
+++ b/
llvm/lib/Support/NativeFormatting.cpp
@@
-103,7
+103,8
@@
void llvm::write_hex(raw_ostream &S, unsigned long long N, std::size_t MinWidth,
bool Upper, bool Prefix) {
unsigned Nibbles = (64 - countLeadingZeros(N) + 3) / 4;
unsigned PrefixChars = Prefix ? 2 : 0;
- unsigned Width = std::max(MinWidth, std::max(1u, Nibbles) + PrefixChars);
+ unsigned Width = std::max(static_cast<unsigned>(MinWidth),
+ std::max(1u, Nibbles) + PrefixChars);
char NumberBuffer[20] = "0x0000000000000000";
if (!Prefix)