Skip to content

Commit aec80c5

Browse files
Fix the arguments of std::min
fixing llvm@1120131
1 parent 352a55e commit aec80c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/Bitstream/BitstreamWriter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class BitstreamWriter {
158158
// Copy data to update into Bytes from the file FS and the buffer Out.
159159
char Bytes[8];
160160
size_t BytesNum = StartBit ? 8 : 4;
161-
size_t BytesFromDisk = std::min(BytesNum, NumOfFlushedBytes - ByteNo);
161+
size_t BytesFromDisk = std::min(static_cast<uint64_t>(BytesNum), NumOfFlushedBytes - ByteNo);
162162
size_t BytesFromBuffer = BytesNum - BytesFromDisk;
163163

164164
// When unaligned, copy existing data into Bytes from the file FS and the

0 commit comments

Comments
 (0)