[llvm-cov] Simplify; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273988 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Vedant Kumar 2016-06-28 03:37:56 +00:00
parent 40a78f87a4
commit edd67d643a

View File

@ -454,8 +454,7 @@ int CodeCoverageTool::show(int argc, const char **argv,
auto OSOrErr =
mainView->createOutputFile("functions", /*InToplevel=*/true);
if (Error E = OSOrErr.takeError()) {
handleAllErrors(OSOrErr.takeError(),
[&](const ErrorInfoBase &EI) { error(EI.message()); });
error(toString(std::move(E)));
return 1;
}
auto OS = std::move(OSOrErr.get());
@ -484,8 +483,7 @@ int CodeCoverageTool::show(int argc, const char **argv,
auto OSOrErr = mainView->createOutputFile(SourceFile, /*InToplevel=*/false);
if (Error E = OSOrErr.takeError()) {
handleAllErrors(OSOrErr.takeError(),
[&](const ErrorInfoBase &EI) { error(EI.message()); });
error(toString(std::move(E)));
return 1;
}
auto OS = std::move(OSOrErr.get());