Make a major API change to BitstreamReader: split all the reading

state out of the BitstreamReader class into a BitstreamCursor class.
Doing this allows the client to have multiple cursors into the same
file, each with potentially different live block stacks and
abbreviation records.

llvm-svn: 70157
This commit is contained in:
Chris Lattner
2009-04-26 20:59:02 +00:00
parent 64fc3c68e5
commit 277800a643
6 changed files with 155 additions and 122 deletions

View File

@@ -1346,7 +1346,8 @@ bool BitcodeReader::ParseBitcode() {
if (SkipBitcodeWrapperHeader(BufPtr, BufEnd))
return Error("Invalid bitcode wrapper header");
Stream.init(BufPtr, BufEnd);
StreamFile.init(BufPtr, BufEnd);
Stream.init(StreamFile);
// Sniff for the signature.
if (Stream.Read(8) != 'B' ||