[lld] r313938 - Update for llvm change.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 21 16:13:41 PDT 2017


Author: rafael
Date: Thu Sep 21 16:13:40 2017
New Revision: 313938

URL: http://llvm.org/viewvc/llvm-project?rev=313938&view=rev
Log:
Update for llvm change.

Modified:
    lld/trunk/COFF/Driver.cpp

Modified: lld/trunk/COFF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.cpp?rev=313938&r1=313937&r2=313938&view=diff
==============================================================================
--- lld/trunk/COFF/Driver.cpp (original)
+++ lld/trunk/COFF/Driver.cpp Thu Sep 21 16:13:40 2017
@@ -499,8 +499,10 @@ static void createImportLibrary(bool AsL
     Exports.push_back(E2);
   }
 
-  writeImportLibrary(getImportName(AsLib), getImplibPath(), Exports,
-                     Config->Machine, false);
+  auto E = writeImportLibrary(getImportName(AsLib), getImplibPath(), Exports,
+                              Config->Machine, false);
+  handleAllErrors(std::move(E),
+                  [&](ErrorInfoBase &EIB) { error(EIB.message()); });
 }
 
 static void parseModuleDefs(StringRef Path) {
@@ -604,12 +606,13 @@ filterBitcodeFiles(StringRef Path, std::
   std::string Temp = S.str();
   TemporaryFiles.push_back(Temp);
 
-  std::error_code EC =
+  Error E =
       llvm::writeArchive(Temp, New, /*WriteSymtab=*/true, Archive::Kind::K_GNU,
                          /*Deterministics=*/true,
                          /*Thin=*/false);
-  if (EC)
-    error("failed to create a new archive " + S.str() + ": " + EC.message());
+  handleAllErrors(std::move(E), [&](const ErrorInfoBase &EI) {
+    error("failed to create a new archive " + S.str() + ": " + EI.message());
+  });
   return Temp;
 }
 




More information about the llvm-commits mailing list