summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-15 04:53:47 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-15 04:53:47 +0000
commit0da0f225455b86e9172755d5004d45751045d08a (patch)
treeb7120c0f718dac396d93fb09ae681ee7dd0c5a7d
parent8a1dc2075606b69d8ae841ac7f075337753c9360 (diff)
downloadbcm5719-llvm-0da0f225455b86e9172755d5004d45751045d08a.tar.gz
bcm5719-llvm-0da0f225455b86e9172755d5004d45751045d08a.zip
Allow jumping to the end of a bitstream while reading
llvm-svn: 69145
-rw-r--r--llvm/include/llvm/Bitcode/BitstreamReader.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/include/llvm/Bitcode/BitstreamReader.h b/llvm/include/llvm/Bitcode/BitstreamReader.h
index d738628efbd..7ff4e26fd8c 100644
--- a/llvm/include/llvm/Bitcode/BitstreamReader.h
+++ b/llvm/include/llvm/Bitcode/BitstreamReader.h
@@ -122,7 +122,7 @@ public:
void JumpToBit(uint64_t BitNo) {
uintptr_t ByteNo = uintptr_t(BitNo/8) & ~3;
uintptr_t WordBitNo = uintptr_t(BitNo) & 31;
- assert(ByteNo < (uintptr_t)(LastChar-FirstChar) && "Invalid location");
+ assert(ByteNo <= (uintptr_t)(LastChar-FirstChar) && "Invalid location");
// Move the cursor to the right word.
NextChar = FirstChar+ByteNo;
OpenPOWER on IntegriCloud