diff --git a/lld/COFF/Error.h b/lld/COFF/Error.h index 0b2d37527e25..e0eb17a045ce 100644 --- a/lld/COFF/Error.h +++ b/lld/COFF/Error.h @@ -25,7 +25,7 @@ template void error(const ErrorOr &V, const Twine &Prefix) { } template T check(Expected E, const Twine &Prefix) { - if (!E) + if (E) return std::move(*E); error(E.takeError(), Prefix); return T();