Modernize the error handling of the Materialize function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220600 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2014-10-24 22:50:48 +00:00
parent 44ccedc273
commit c498284e46
12 changed files with 39 additions and 36 deletions

View File

@@ -1626,8 +1626,10 @@ bool ModuleLinker::run() {
// Materialize if needed.
if (SF->isMaterializable()) {
if (SF->Materialize(&ErrorMsg))
if (std::error_code EC = SF->materialize()) {
ErrorMsg = EC.message();
return true;
}
}
// Skip if no body (function is external).
@@ -1677,8 +1679,10 @@ bool ModuleLinker::run() {
// Materialize if needed.
if (SF->isMaterializable()) {
if (SF->Materialize(&ErrorMsg))
if (std::error_code EC = SF->materialize()) {
ErrorMsg = EC.message();
return true;
}
}
// Skip if no body (function is external).