[llvm-cov] Simplify; NFC

llvm-svn: 273988
This commit is contained in:
Vedant Kumar 2016-06-28 03:37:56 +00:00
parent 017cf35d7c
commit 72e0fe9c12
1 changed files with 2 additions and 4 deletions

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());