summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-05-06 08:12:09 +0000
committerChris Lattner <sabre@nondot.org>2007-05-06 08:12:09 +0000
commiteb99789fefa3115ce1dbc6e2250c990cb6c15709 (patch)
treeaa3cf5d53a49803d73eb53eff2ec2268e0b00845
parentf985c492e1de310b77b343ad8bef14ef3e6029d4 (diff)
downloadbcm5719-llvm-eb99789fefa3115ce1dbc6e2250c990cb6c15709.tar.gz
bcm5719-llvm-eb99789fefa3115ce1dbc6e2250c990cb6c15709.zip
we aren't at the end of stream until we've consumed all the bytes AND all
the bits in those bytes. llvm-svn: 36861
-rw-r--r--llvm/include/llvm/Bitcode/BitstreamReader.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/include/llvm/Bitcode/BitstreamReader.h b/llvm/include/llvm/Bitcode/BitstreamReader.h
index 6f028fba000..86a26c2c20e 100644
--- a/llvm/include/llvm/Bitcode/BitstreamReader.h
+++ b/llvm/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 {
OpenPOWER on IntegriCloud