diff --git a/tools/gold/gold-plugin.cpp b/tools/gold/gold-plugin.cpp index cc0e9f35661..9d6540d2d47 100644 --- a/tools/gold/gold-plugin.cpp +++ b/tools/gold/gold-plugin.cpp @@ -483,7 +483,7 @@ static GlobalObject *makeInternalReplacement(GlobalObject *GO) { GlobalObject *Ret; if (auto *F = dyn_cast(GO)) { if (F->isMaterializable()) { - if (std::error_code EC = F->materialize()) + if (F->materialize()) message(LDPL_FATAL, "LLVM gold plugin has failed to read a function"); }