summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Bitcode/BitstreamReader.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/Bitcode/BitstreamReader.h b/include/llvm/Bitcode/BitstreamReader.h
index 4e476f7a45..e34dd09219 100644
--- a/include/llvm/Bitcode/BitstreamReader.h
+++ b/include/llvm/Bitcode/BitstreamReader.h
@@ -105,7 +105,7 @@ public:
/// GetCurrentBitNo - Return the bit # of the bit we are reading.
uint64_t GetCurrentBitNo() const {
- return (NextChar-FirstChar)*8 + (32-BitsInCurWord);
+ return (NextChar-FirstChar)*8 + ((32-BitsInCurWord) & 31);
}
/// JumpToBit - Reset the stream to the specified bit number.