[lld] r311430 - Fix a -Wpessimizing-move warning from Clang on this code --
Chandler Carruth via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 22 01:02:13 PDT 2017
Author: chandlerc
Date: Tue Aug 22 01:02:12 2017
New Revision: 311430
URL: http://llvm.org/viewvc/llvm-project?rev=311430&view=rev
Log:
Fix a -Wpessimizing-move warning from Clang on this code --
a std::move() isn't needed here as the object is a temporary.
Modified:
lld/trunk/COFF/DriverUtils.cpp
Modified: lld/trunk/COFF/DriverUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/DriverUtils.cpp?rev=311430&r1=311429&r2=311430&view=diff
==============================================================================
--- lld/trunk/COFF/DriverUtils.cpp (original)
+++ lld/trunk/COFF/DriverUtils.cpp Tue Aug 22 01:02:12 2017
@@ -427,7 +427,7 @@ static std::string createManifestXml() {
return OutputBufferOrError.get()->getBuffer();
// Using built-in library failed, possibly because libxml2 is not installed.
// Shell out to mt.exe instead.
- handleAllErrors(std::move(OutputBufferOrError.takeError()),
+ handleAllErrors(OutputBufferOrError.takeError(),
[&](ErrorInfoBase &EIB) {
warn("error with internal manifest tool: " + EIB.message());
});
More information about the llvm-commits
mailing list