Simplify. NFC.

llvm-svn: 291811
This commit is contained in:
Rui Ueyama 2017-01-12 21:05:48 +00:00
parent e29db2173b
commit 61fc94e0c1
1 changed files with 1 additions and 5 deletions

View File

@ -56,11 +56,7 @@ template <class T> T check(ErrorOr<T> E) {
template <class T> T check(Expected<T> E) {
if (!E)
handleAllErrors(std::move(E.takeError()),
[](llvm::ErrorInfoBase &EIB) -> Error {
fatal(EIB.message());
return Error::success();
});
fatal(llvm::toString(E.takeError()));
return std::move(*E);
}