Don't tip-to around BitstreamReader::JumpToBit jumping to the end of the stream. LLVM has been updated to allow this

llvm-svn: 69146
This commit is contained in:
Douglas Gregor 2009-04-15 04:54:29 +00:00
parent 0da0f22545
commit 534b6f27a0
1 changed files with 2 additions and 5 deletions

View 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;
};
}