Return an error_code from materializeAllPermanently.

llvm-svn: 199275
This commit is contained in:
Rafael Espindola
2014-01-14 23:51:27 +00:00
parent 4dcc4637b5
commit e9fab9b077
7 changed files with 25 additions and 21 deletions

View File

@@ -383,14 +383,12 @@ error_code Module::materializeAll() {
return Materializer->MaterializeModule(this);
}
bool Module::MaterializeAllPermanently(std::string *ErrInfo) {
if (error_code EC = materializeAll()) {
if (ErrInfo)
*ErrInfo = EC.message();
return true;
}
error_code Module::materializeAllPermanently() {
if (error_code EC = materializeAll())
return EC;
Materializer.reset();
return false;
return error_code::success();
}
//===----------------------------------------------------------------------===//