/// Make sure the entire Module has been completely read.
///
- virtual std::error_code materializeModule(Module *M) = 0;
+ virtual std::error_code materializeModule() = 0;
virtual std::error_code materializeMetadata() = 0;
virtual void setStripDebugInfo() = 0;
void releaseBuffer();
std::error_code materialize(GlobalValue *GV) override;
- std::error_code materializeModule(Module *M) override;
+ std::error_code materializeModule() override;
std::vector<StructType *> getIdentifiedStructTypes() const override;
/// \brief Main interface to parsing a bitcode buffer.
return materializeForwardReferencedFunctions();
}
-std::error_code BitcodeReader::materializeModule(Module *M) {
- assert(M == TheModule &&
- "Can only Materialize the Module this BitcodeReader is attached to.");
-
+std::error_code BitcodeReader::materializeModule() {
if (std::error_code EC = materializeMetadata())
return EC;
for (unsigned I = 0, E = InstsWithTBAATag.size(); I < E; I++)
UpgradeInstWithTBAATag(InstsWithTBAATag[I]);
- UpgradeDebugInfo(*M);
+ UpgradeDebugInfo(*TheModule);
return std::error_code();
}
std::error_code Module::materializeAll() {
if (!Materializer)
return std::error_code();
- if (std::error_code EC = Materializer->materializeModule(this))
+ if (std::error_code EC = Materializer->materializeModule())
return EC;
Materializer.reset();
return std::error_code();