forked from OSchip/llvm-project
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:
parent
0da0f22545
commit
534b6f27a0
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue