From: Douglas Gregor Date: Wed, 15 Apr 2009 04:54:29 +0000 (+0000) Subject: Don't tip-to around BitstreamReader::JumpToBit jumping to the end of the stream.... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=62e445c4dff3cfa6b040153a6f53116073d85846;p=clang Don't tip-to around BitstreamReader::JumpToBit jumping to the end of the stream. LLVM has been updated to allow this git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69146 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp index 69745ce7a3..ad3c2e55a9 100644 --- a/lib/Frontend/PCHReader.cpp +++ b/lib/Frontend/PCHReader.cpp @@ -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; }; }