From 048d0bd4c0e92db88a508b5fc107136a1262b6bc Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 6 May 2007 01:43:38 +0000 Subject: Fix a subtle bug that prevented round-tripping 470.lbm git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36825 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Bitcode/BitstreamReader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/llvm/Bitcode/BitstreamReader.h b/include/llvm/Bitcode/BitstreamReader.h index 4e476f7..e34dd09 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. -- cgit v1.1