[cfe-commits] r69146 - /cfe/trunk/lib/Frontend/PCHReader.cpp
Douglas Gregor
dgregor at apple.com
Tue Apr 14 21:54:29 PDT 2009
Author: dgregor
Date: Tue Apr 14 23:54:29 2009
New Revision: 69146
URL: http://llvm.org/viewvc/llvm-project?rev=69146&view=rev
Log:
Don't tip-to around BitstreamReader::JumpToBit jumping to the end of the stream. LLVM has been updated to allow this
Modified:
cfe/trunk/lib/Frontend/PCHReader.cpp
Modified: cfe/trunk/lib/Frontend/PCHReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReader.cpp?rev=69146&r1=69145&r2=69146&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PCHReader.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHReader.cpp Tue Apr 14 23:54:29 2009
@@ -889,18 +889,15 @@
/// 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;
};
}
More information about the cfe-commits
mailing list