summaryrefslogtreecommitdiff
path: root/include/llvm/Bitcode/BitstreamReader.h
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
commit37a4d8dbbbf7d8c4ed368a65ce3e9308262aa1f6 (patch)
treef7944f04908289e8b3805d3b9fdcceee8241b417 /include/llvm/Bitcode/BitstreamReader.h
parentdd9f52399740195ab27b3d8bbebe6888265c03fa (diff)
downloadllvm-37a4d8dbbbf7d8c4ed368a65ce3e9308262aa1f6.tar.gz
llvm-37a4d8dbbbf7d8c4ed368a65ce3e9308262aa1f6.tar.bz2
llvm-37a4d8dbbbf7d8c4ed368a65ce3e9308262aa1f6.tar.xz
Allow jumping to the end of a bitstream while reading
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69145 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Bitcode/BitstreamReader.h')
-rw-r--r--include/llvm/Bitcode/BitstreamReader.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/Bitcode/BitstreamReader.h b/include/llvm/Bitcode/BitstreamReader.h
index d738628efb..7ff4e26fd8 100644
--- a/include/llvm/Bitcode/BitstreamReader.h
+++ b/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;