summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/IR/GVMaterializer.h2
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp9
-rw-r--r--llvm/lib/IR/Module.cpp2
3 files changed, 5 insertions, 8 deletions
diff --git a/llvm/include/llvm/IR/GVMaterializer.h b/llvm/include/llvm/IR/GVMaterializer.h
index 687f526e00e..489cbf58dfa 100644
--- a/llvm/include/llvm/IR/GVMaterializer.h
+++ b/llvm/include/llvm/IR/GVMaterializer.h
@@ -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;
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index be12dbed0ce..d1f102704d6 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -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();
}
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp
index ee7ec5e22e8..0685c1a206d 100644
--- a/llvm/lib/IR/Module.cpp
+++ b/llvm/lib/IR/Module.cpp
@@ -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();
OpenPOWER on IntegriCloud