forked from OSchip/llvm-project
parent
e29db2173b
commit
61fc94e0c1
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue