From 66ec178c6c738446c086803d24a87cc8848a0280 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Thu, 30 Jun 2016 00:32:24 +0000 Subject: [PATCH] Fix logic error in check() function. llvm-svn: 274195 --- lld/COFF/Error.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();