Drop materializeAllPermanently.

This inlines materializeAll into the only caller
(materializeAllPermanently) and renames materializeAllPermanently to
just materializeAll.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256024 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2015-12-18 20:13:39 +00:00
parent cd00b72f32
commit 838f8a4b1d
6 changed files with 8 additions and 16 deletions
+2 -7
View File
@@ -379,7 +379,7 @@ const DataLayout &Module::getDataLayout() const { return DL; }
//
void Module::setMaterializer(GVMaterializer *GVM) {
assert(!Materializer &&
"Module already has a GVMaterializer. Call MaterializeAllPermanently"
"Module already has a GVMaterializer. Call materializeAll"
" to clear it out before setting another one.");
Materializer.reset(GVM);
}
@@ -394,13 +394,8 @@ std::error_code Module::materialize(GlobalValue *GV) {
std::error_code Module::materializeAll() {
if (!Materializer)
return std::error_code();
return Materializer->materializeModule(this);
}
std::error_code Module::materializeAllPermanently() {
if (std::error_code EC = materializeAll())
if (std::error_code EC = Materializer->materializeModule(this))
return EC;
Materializer.reset();
return std::error_code();
}