[lld] r313930 - Simplify error handling. NFC.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 21 15:50:52 PDT 2017
Author: rafael
Date: Thu Sep 21 15:50:52 2017
New Revision: 313930
URL: http://llvm.org/viewvc/llvm-project?rev=313930&view=rev
Log:
Simplify error handling. NFC.
Modified:
lld/trunk/COFF/LTO.cpp
lld/trunk/ELF/LTO.cpp
Modified: lld/trunk/COFF/LTO.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/LTO.cpp?rev=313930&r1=313929&r2=313930&view=diff
==============================================================================
--- lld/trunk/COFF/LTO.cpp (original)
+++ lld/trunk/COFF/LTO.cpp Thu Sep 21 15:50:52 2017
@@ -49,10 +49,8 @@ static void diagnosticHandler(const Diag
}
static void checkError(Error E) {
- handleAllErrors(std::move(E), [&](ErrorInfoBase &EIB) -> Error {
- error(EIB.message());
- return Error::success();
- });
+ handleAllErrors(std::move(E),
+ [&](ErrorInfoBase &EIB) { error(EIB.message()); });
}
static void saveBuffer(StringRef Buffer, const Twine &Path) {
Modified: lld/trunk/ELF/LTO.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LTO.cpp?rev=313930&r1=313929&r2=313930&view=diff
==============================================================================
--- lld/trunk/ELF/LTO.cpp (original)
+++ lld/trunk/ELF/LTO.cpp Thu Sep 21 15:50:52 2017
@@ -61,10 +61,8 @@ static void diagnosticHandler(const Diag
}
static void checkError(Error E) {
- handleAllErrors(std::move(E), [&](ErrorInfoBase &EIB) -> Error {
- error(EIB.message());
- return Error::success();
- });
+ handleAllErrors(std::move(E),
+ [&](ErrorInfoBase &EIB) { error(EIB.message()); });
}
static std::unique_ptr<lto::LTO> createLTO() {
More information about the llvm-commits
mailing list