Changes in directory llvm/lib/Bitcode/Reader:
BitcodeReader.cpp updated: 1.18 -> 1.19 BitcodeReader.h updated: 1.12 -> 1.13 --- Log message: The stream to read from is now an ivar --- Diffs of the changes: (+18 -20) BitcodeReader.cpp | 25 ++++++++++++------------- BitcodeReader.h | 13 ++++++------- 2 files changed, 18 insertions(+), 20 deletions(-) Index: llvm/lib/Bitcode/Reader/BitcodeReader.cpp diff -u llvm/lib/Bitcode/Reader/BitcodeReader.cpp:1.18 llvm/lib/Bitcode/Reader/BitcodeReader.cpp:1.19 --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp:1.18 Mon Apr 30 23:59:48 2007 +++ llvm/lib/Bitcode/Reader/BitcodeReader.cpp Tue May 1 00:01:34 2007 @@ -152,7 +152,7 @@ } -bool BitcodeReader::ParseTypeTable(BitstreamReader &Stream) { +bool BitcodeReader::ParseTypeTable() { if (Stream.EnterSubBlock()) return Error("Malformed block record"); @@ -298,7 +298,7 @@ } -bool BitcodeReader::ParseTypeSymbolTable(BitstreamReader &Stream) { +bool BitcodeReader::ParseTypeSymbolTable() { if (Stream.EnterSubBlock()) return Error("Malformed block record"); @@ -346,7 +346,7 @@ } } -bool BitcodeReader::ParseValueSymbolTable(BitstreamReader &Stream) { +bool BitcodeReader::ParseValueSymbolTable() { if (Stream.EnterSubBlock()) return Error("Malformed block record"); @@ -444,7 +444,7 @@ } -bool BitcodeReader::ParseConstants(BitstreamReader &Stream) { +bool BitcodeReader::ParseConstants() { if (Stream.EnterSubBlock()) return Error("Malformed block record"); @@ -661,7 +661,7 @@ /// ParseFunction - When we see the block for a function body, remember where it /// is and then skip it. This lets us lazily deserialize the functions. -bool BitcodeReader::ParseFunction(BitstreamReader &Stream) { +bool BitcodeReader::ParseFunction() { // Get the function we are talking about. if (FunctionsWithBodies.empty()) return Error("Insufficient function protos"); @@ -683,8 +683,7 @@ return false; } -bool BitcodeReader::ParseModule(BitstreamReader &Stream, - const std::string &ModuleID) { +bool BitcodeReader::ParseModule(const std::string &ModuleID) { // Reject multiple MODULE_BLOCK's in a single bitstream. if (TheModule) return Error("Multiple MODULE_BLOCKs in same stream"); @@ -719,19 +718,19 @@ return Error("Malformed block record"); break; case bitc::TYPE_BLOCK_ID: - if (ParseTypeTable(Stream)) + if (ParseTypeTable()) return true; break; case bitc::TYPE_SYMTAB_BLOCK_ID: - if (ParseTypeSymbolTable(Stream)) + if (ParseTypeSymbolTable()) return true; break; case bitc::VALUE_SYMTAB_BLOCK_ID: - if (ParseValueSymbolTable(Stream)) + if (ParseValueSymbolTable()) return true; break; case bitc::CONSTANTS_BLOCK_ID: - if (ParseConstants(Stream) || ResolveGlobalAndAliasInits()) + if (ParseConstants() || ResolveGlobalAndAliasInits()) return true; break; case bitc::FUNCTION_BLOCK_ID: @@ -742,7 +741,7 @@ HasReversedFunctionsWithBodies = true; } - if (ParseFunction(Stream)) + if (ParseFunction()) return true; break; } @@ -932,7 +931,7 @@ // We only know the MODULE subblock ID. if (BlockID == bitc::MODULE_BLOCK_ID) { - if (ParseModule(Stream, Buffer->getBufferIdentifier())) + if (ParseModule(Buffer->getBufferIdentifier())) return true; } else if (Stream.SkipBlock()) { return Error("Malformed block record"); Index: llvm/lib/Bitcode/Reader/BitcodeReader.h diff -u llvm/lib/Bitcode/Reader/BitcodeReader.h:1.12 llvm/lib/Bitcode/Reader/BitcodeReader.h:1.13 --- llvm/lib/Bitcode/Reader/BitcodeReader.h:1.12 Mon Apr 30 23:59:48 2007 +++ llvm/lib/Bitcode/Reader/BitcodeReader.h Tue May 1 00:01:34 2007 @@ -23,7 +23,6 @@ #include <vector> namespace llvm { - class BitstreamReader; class MemoryBuffer; class BitcodeReaderValueList : public User { @@ -117,12 +116,12 @@ private: const Type *getTypeByID(unsigned ID, bool isTypeTable = false); - bool ParseModule(BitstreamReader &Stream, const std::string &ModuleID); - bool ParseTypeTable(BitstreamReader &Stream); - bool ParseTypeSymbolTable(BitstreamReader &Stream); - bool ParseValueSymbolTable(BitstreamReader &Stream); - bool ParseConstants(BitstreamReader &Stream); - bool ParseFunction(BitstreamReader &Stream); + bool ParseModule(const std::string &ModuleID); + bool ParseTypeTable(); + bool ParseTypeSymbolTable(); + bool ParseValueSymbolTable(); + bool ParseConstants(); + bool ParseFunction(); bool ResolveGlobalAndAliasInits(); }; _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits