[llvm-commits] [llvm] r69145 - /llvm/trunk/include/llvm/Bitcode/BitstreamReader.h

Douglas Gregor dgregor at apple.com
Tue Apr 14 21:53:47 PDT 2009


Author: dgregor
Date: Tue Apr 14 23:53:47 2009
New Revision: 69145

URL: http://llvm.org/viewvc/llvm-project?rev=69145&view=rev
Log:
Allow jumping to the end of a bitstream while reading

Modified:
    llvm/trunk/include/llvm/Bitcode/BitstreamReader.h

Modified: llvm/trunk/include/llvm/Bitcode/BitstreamReader.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Bitcode/BitstreamReader.h?rev=69145&r1=69144&r2=69145&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Bitcode/BitstreamReader.h (original)
+++ llvm/trunk/include/llvm/Bitcode/BitstreamReader.h Tue Apr 14 23:53:47 2009
@@ -122,7 +122,7 @@
   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;





More information about the llvm-commits mailing list