[lld] r264951 - Fix -Wpessimizing-move warnings.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 30 15:40:39 PDT 2016
Author: ruiu
Date: Wed Mar 30 17:40:16 2016
New Revision: 264951
URL: http://llvm.org/viewvc/llvm-project?rev=264951&view=rev
Log:
Fix -Wpessimizing-move warnings.
Modified:
lld/trunk/lib/Core/Resolver.cpp
Modified: lld/trunk/lib/Core/Resolver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/Resolver.cpp?rev=264951&r1=264950&r2=264951&view=diff
==============================================================================
--- lld/trunk/lib/Core/Resolver.cpp (original)
+++ lld/trunk/lib/Core/Resolver.cpp Wed Mar 30 17:40:16 2016
@@ -89,7 +89,7 @@ llvm::Error Resolver::handleSharedLibrar
SharedLibraryFile *sharedLibrary = cast<SharedLibraryFile>(&file);
auto undefAddedOrError = handleFile(*sharedLibrary);
if (auto ec = undefAddedOrError.takeError())
- return std::move(ec);
+ return ec;
undefAddedOrError =
forEachUndefines(file, [&](StringRef undefName) -> llvm::Expected<bool> {
auto atom = sharedLibrary->exports(undefName);
@@ -99,7 +99,7 @@ llvm::Error Resolver::handleSharedLibrar
});
if (auto ec = undefAddedOrError.takeError())
- return std::move(ec);
+ return ec;
return llvm::Error();
}
More information about the llvm-commits
mailing list