mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70157 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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' ||
|
||||
|
||||
@@ -86,7 +86,8 @@ public:
|
||||
|
||||
class BitcodeReader : public ModuleProvider {
|
||||
MemoryBuffer *Buffer;
|
||||
BitstreamReader Stream;
|
||||
BitstreamReader StreamFile;
|
||||
BitstreamCursor Stream;
|
||||
|
||||
const char *ErrorString;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ using namespace llvm;
|
||||
Deserializer::Deserializer(BitstreamReader& stream)
|
||||
: Stream(stream), RecIdx(0), FreeList(NULL), AbbrevNo(0), RecordCode(0) {
|
||||
|
||||
StreamStart = Stream.GetCurrentBitNo();
|
||||
StreamStart = Stream.GetCurrentBitNo();
|
||||
}
|
||||
|
||||
Deserializer::~Deserializer() {
|
||||
|
||||
Reference in New Issue
Block a user