diff options
author | Chris Lattner <sabre@nondot.org> | 2007-05-06 08:12:09 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-05-06 08:12:09 +0000 |
commit | 9850b57587c5e7e3608ba881e62882e46f79025c (patch) | |
tree | 1c6cf5768518b5749bd04b381a4de4d101f9379a /include/llvm/Bitcode/BitstreamReader.h | |
parent | 11d8fdaf6a6f96cb5513ebee34fe2b6bc3ea3e8f (diff) |
we aren't at the end of stream until we've consumed all the bytes AND all
the bits in those bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36861 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Bitcode/BitstreamReader.h')
-rw-r--r-- | include/llvm/Bitcode/BitstreamReader.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/Bitcode/BitstreamReader.h b/include/llvm/Bitcode/BitstreamReader.h index 6f028fba00..86a26c2c20 100644 --- a/include/llvm/Bitcode/BitstreamReader.h +++ b/include/llvm/Bitcode/BitstreamReader.h @@ -101,7 +101,9 @@ public: } } - bool AtEndOfStream() const { return NextChar == LastChar; } + bool AtEndOfStream() const { + return NextChar == LastChar && BitsInCurWord == 0; + } /// GetCurrentBitNo - Return the bit # of the bit we are reading. uint64_t GetCurrentBitNo() const { |