Fix a subtle bug that prevented round-tripping 470.lbm
authorChris Lattner <sabre@nondot.org>
Sun, 6 May 2007 01:43:38 +0000 (01:43 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 6 May 2007 01:43:38 +0000 (01:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36825 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Bitcode/BitstreamReader.h

index 4e476f7a45f392882fda8afa773e49fb468189a1..e34dd0921947e721bc8b1998566b206a610d5412 100644 (file)
@@ -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.