]> granicus.if.org Git - clang/commitdiff
Don't tip-to around BitstreamReader::JumpToBit jumping to the end of the stream....
authorDouglas Gregor <dgregor@apple.com>
Wed, 15 Apr 2009 04:54:29 +0000 (04:54 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 15 Apr 2009 04:54:29 +0000 (04:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69146 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/PCHReader.cpp

index 69745ce7a316a48c6658b4c5e3fb602d636cbb8c..ad3c2e55a9906457cd19e3b5772eb7f1fd919339 100644 (file)
@@ -889,18 +889,15 @@ namespace {
   /// then restores it when destroyed.
   struct VISIBILITY_HIDDEN SavedStreamPosition {
     explicit SavedStreamPosition(llvm::BitstreamReader &Stream)
-      : Stream(Stream), Offset(Stream.GetCurrentBitNo()),
-        EndOfStream(Stream.AtEndOfStream()){ }
+      : Stream(Stream), Offset(Stream.GetCurrentBitNo()) { }
 
     ~SavedStreamPosition() {
-      if (!EndOfStream) 
-        Stream.JumpToBit(Offset);
+      Stream.JumpToBit(Offset);
     }
 
   private:
     llvm::BitstreamReader &Stream;
     uint64_t Offset;
-    bool EndOfStream;
   };
 }