mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
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:
@@ -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).
|
||||
|
Reference in New Issue
Block a user