From 1c2241a7936bf85aa68aef94bd40c3ba77d8ddf2 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Mon, 10 Feb 2020 05:18:09 -0800 Subject: Remove redundant "std::move"s in return statements --- llvm/lib/Object/COFFObjectFile.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Object/COFFObjectFile.cpp') diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp index 2c0f6dc..bab9a7c 100644 --- a/llvm/lib/Object/COFFObjectFile.cpp +++ b/llvm/lib/Object/COFFObjectFile.cpp @@ -297,7 +297,7 @@ COFFObjectFile::getSectionContents(DataRefImpl Ref) const { const coff_section *Sec = toSec(Ref); ArrayRef Res; if (Error E = getSectionContents(Sec, Res)) - return std::move(E); + return E; return Res; } @@ -1625,7 +1625,7 @@ ObjectFile::createCOFFObjectFile(MemoryBufferRef Object) { std::unique_ptr Ret(new COFFObjectFile(Object, EC)); if (EC) return errorCodeToError(EC); - return std::move(Ret); + return Ret; } bool BaseRelocRef::operator==(const BaseRelocRef &Other) const { @@ -1666,7 +1666,7 @@ std::error_code BaseRelocRef::getRVA(uint32_t &Result) const { do { \ Error E = (Expr); \ if (E) \ - return std::move(E); \ + return E; \ } while (0) Expected> @@ -1832,7 +1832,7 @@ ResourceSectionRef::getContents(const coff_resource_data_entry &Entry) { uint64_t Offset = Entry.DataRVA + Sym->getValue(); ArrayRef Contents; if (Error E = Obj->getSectionContents(Section, Contents)) - return std::move(E); + return E; if (Offset + Entry.DataSize > Contents.size()) return createStringError(object_error::parse_failed, "data outside of section"); -- cgit v1.1