-bool BitcodeReader::ParseTypeTable(BitstreamReader &Stream) {
+bool BitcodeReader::ParseTypeTable() {
if (Stream.EnterSubBlock())
return Error("Malformed block record");
if (Stream.EnterSubBlock())
return Error("Malformed block record");
-bool BitcodeReader::ParseTypeSymbolTable(BitstreamReader &Stream) {
+bool BitcodeReader::ParseTypeSymbolTable() {
if (Stream.EnterSubBlock())
return Error("Malformed block record");
if (Stream.EnterSubBlock())
return Error("Malformed block record");
-bool BitcodeReader::ParseValueSymbolTable(BitstreamReader &Stream) {
+bool BitcodeReader::ParseValueSymbolTable() {
if (Stream.EnterSubBlock())
return Error("Malformed block record");
if (Stream.EnterSubBlock())
return Error("Malformed block record");
-bool BitcodeReader::ParseConstants(BitstreamReader &Stream) {
+bool BitcodeReader::ParseConstants() {
if (Stream.EnterSubBlock())
return Error("Malformed block record");
if (Stream.EnterSubBlock())
return Error("Malformed block record");
/// 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.
/// 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");
// Get the function we are talking about.
if (FunctionsWithBodies.empty())
return Error("Insufficient function protos");
-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");
// Reject multiple MODULE_BLOCK's in a single bitstream.
if (TheModule)
return Error("Multiple MODULE_BLOCKs in same stream");
return Error("Malformed block record");
break;
case bitc::TYPE_BLOCK_ID:
return Error("Malformed block record");
break;
case bitc::TYPE_BLOCK_ID:
- if (ParseTypeTable(Stream))
return true;
break;
case bitc::TYPE_SYMTAB_BLOCK_ID:
return true;
break;
case bitc::TYPE_SYMTAB_BLOCK_ID:
- if (ParseTypeSymbolTable(Stream))
+ if (ParseTypeSymbolTable())
return true;
break;
case bitc::VALUE_SYMTAB_BLOCK_ID:
return true;
break;
case bitc::VALUE_SYMTAB_BLOCK_ID:
- if (ParseValueSymbolTable(Stream))
+ if (ParseValueSymbolTable())
return true;
break;
case bitc::CONSTANTS_BLOCK_ID:
return true;
break;
case bitc::CONSTANTS_BLOCK_ID:
- if (ParseConstants(Stream) || ResolveGlobalAndAliasInits())
+ if (ParseConstants() || ResolveGlobalAndAliasInits())
return true;
break;
case bitc::FUNCTION_BLOCK_ID:
return true;
break;
case bitc::FUNCTION_BLOCK_ID:
HasReversedFunctionsWithBodies = true;
}
HasReversedFunctionsWithBodies = true;
}
- if (ParseFunction(Stream))
// We only know the MODULE subblock ID.
if (BlockID == bitc::MODULE_BLOCK_ID) {
// 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");
return true;
} else if (Stream.SkipBlock()) {
return Error("Malformed block record");
#include <vector>
namespace llvm {
#include <vector>
namespace llvm {
class MemoryBuffer;
class BitcodeReaderValueList : public User {
class MemoryBuffer;
class BitcodeReaderValueList : public User {
private:
const Type *getTypeByID(unsigned ID, bool isTypeTable = false);
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();
};
bool ResolveGlobalAndAliasInits();
};