forked from OSchip/llvm-project
parent
51a247065e
commit
79753a07a6
|
@ -42,7 +42,7 @@ public:
|
|||
|
||||
/// 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;
|
||||
|
|
|
@ -254,7 +254,7 @@ public:
|
|||
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.
|
||||
|
@ -5283,10 +5283,7 @@ std::error_code BitcodeReader::materialize(GlobalValue *GV) {
|
|||
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;
|
||||
|
||||
|
@ -5329,7 +5326,7 @@ std::error_code BitcodeReader::materializeModule(Module *M) {
|
|||
for (unsigned I = 0, E = InstsWithTBAATag.size(); I < E; I++)
|
||||
UpgradeInstWithTBAATag(InstsWithTBAATag[I]);
|
||||
|
||||
UpgradeDebugInfo(*M);
|
||||
UpgradeDebugInfo(*TheModule);
|
||||
return std::error_code();
|
||||
}
|
||||
|
||||
|
|
|
@ -394,7 +394,7 @@ std::error_code Module::materialize(GlobalValue *GV) {
|
|||
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();
|
||||
|
|
Loading…
Reference in New Issue