summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-10-24 22:50:48 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-10-24 22:50:48 +0000
commit5a52e6dc9eeb07e44a62bdc828bc9b8b7348549d (patch)
treed103373d61ab3a674d71ed65a5758610bf5a6482 /llvm/lib/Linker
parent2813f496d98f3e6d2c9c2774601999e147af34ef (diff)
downloadbcm5719-llvm-5a52e6dc9eeb07e44a62bdc828bc9b8b7348549d.tar.gz
bcm5719-llvm-5a52e6dc9eeb07e44a62bdc828bc9b8b7348549d.zip
Modernize the error handling of the Materialize function.
llvm-svn: 220600
Diffstat (limited to 'llvm/lib/Linker')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index 510813ad972..c0601430fea 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -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).
OpenPOWER on IntegriCloud