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) {
|
template <class T> T check(Expected<T> E) {
|
||||||
if (!E)
|
if (!E)
|
||||||
handleAllErrors(std::move(E.takeError()),
|
fatal(llvm::toString(E.takeError()));
|
||||||
[](llvm::ErrorInfoBase &EIB) -> Error {
|
|
||||||
fatal(EIB.message());
|
|
||||||
return Error::success();
|
|
||||||
});
|
|
||||||
return std::move(*E);
|
return std::move(*E);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue