[llvm] cab6f5b - Use one more byte to silence a warning from Vistual C++
Jianzhou Zhao via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 18 09:43:29 PDT 2020
Author: Jianzhou Zhao
Date: 2020-09-18T16:42:38Z
New Revision: cab6f5b2ab814a4be3fd71aacdbe10298f512833
URL: https://github.com/llvm/llvm-project/commit/cab6f5b2ab814a4be3fd71aacdbe10298f512833
DIFF: https://github.com/llvm/llvm-project/commit/cab6f5b2ab814a4be3fd71aacdbe10298f512833.diff
LOG: Use one more byte to silence a warning from Vistual C++
Added:
Modified:
llvm/include/llvm/Bitstream/BitstreamWriter.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Bitstream/BitstreamWriter.h b/llvm/include/llvm/Bitstream/BitstreamWriter.h
index 8dc135e6404d..3954df4897ae 100644
--- a/llvm/include/llvm/Bitstream/BitstreamWriter.h
+++ b/llvm/include/llvm/Bitstream/BitstreamWriter.h
@@ -156,7 +156,7 @@ class BitstreamWriter {
uint64_t CurPos = FS->tell();
// Copy data to update into Bytes from the file FS and the buffer Out.
- char Bytes[8];
+ char Bytes[9]; // Use one more byte to silence a warning from Visual C++.
size_t BytesNum = StartBit ? 8 : 4;
size_t BytesFromDisk = std::min(static_cast<uint64_t>(BytesNum), NumOfFlushedBytes - ByteNo);
size_t BytesFromBuffer = BytesNum - BytesFromDisk;
More information about the llvm-commits
mailing list