From 277800a6435e477fc47fa14cb1e0252f3a95c10e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 26 Apr 2009 20:59:02 +0000 Subject: 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 --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp') diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 8079acddb06a..fe20f7258783 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -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' || -- cgit v1.2.3