Update the error handling of lib/Linker.
[oota-llvm.git] / tools / gold / gold-plugin.cpp
index 2d50f49ffd786456b7e57740dd4ac998c248adcf..cc0e9f35661de695cb84fd580e8268f6b06b7c8b 100644 (file)
@@ -777,9 +777,8 @@ static ld_plugin_status allSymbolsReadHook(raw_fd_ostream *ApiFile) {
       M->setTargetTriple(DefaultTriple);
     }
 
-    std::string ErrMsg;
-    if (L.linkInModule(M.get(), &ErrMsg))
-      message(LDPL_FATAL, "Failed to link module: %s", ErrMsg.c_str());
+    if (L.linkInModule(M.get()))
+      message(LDPL_FATAL, "Failed to link module");
   }
 
   for (const auto &Name : Internalize) {