aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Bitcode/BitstreamReader.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Bitcode/BitstreamReader.h')
-rw-r--r--include/llvm/Bitcode/BitstreamReader.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Bitcode/BitstreamReader.h b/include/llvm/Bitcode/BitstreamReader.h
index 7cbd10f532..48eaa36b52 100644
--- a/include/llvm/Bitcode/BitstreamReader.h
+++ b/include/llvm/Bitcode/BitstreamReader.h
@@ -16,6 +16,7 @@
#define BITSTREAM_READER_H
#include "llvm/Bitcode/BitCodes.h"
+#include <climits>
#include <vector>
namespace llvm {
@@ -114,7 +115,7 @@ public:
/// GetCurrentBitNo - Return the bit # of the bit we are reading.
uint64_t GetCurrentBitNo() const {
- return (NextChar-FirstChar)*8 + ((32-BitsInCurWord) & 31);
+ return (NextChar-FirstChar)*CHAR_BIT + ((32-BitsInCurWord) & 31);
}
/// JumpToBit - Reset the stream to the specified bit number.