From 962dde3cef3184f1683d5070c298c9a29509d62e 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70157 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Bitcode/Reader/BitcodeReader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/Bitcode/Reader/BitcodeReader.cpp') diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index 8079acddb0..fe20f72587 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/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-18-g5258