Simplify error handling. NFC.

llvm-svn: 313930
This commit is contained in:
Rafael Espindola 2017-09-21 22:50:52 +00:00
parent 475a38fc5c
commit 5329c75e4f
2 changed files with 4 additions and 8 deletions

View File

@ -49,10 +49,8 @@ static void diagnosticHandler(const DiagnosticInfo &DI) {
}
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) {

View File

@ -61,10 +61,8 @@ static void diagnosticHandler(const DiagnosticInfo &DI) {
}
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() {