[PATCH] D71804: Fix -Wpessimizing-move warnings
Stephan Dollberg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 5 03:05:40 PST 2020
stephan.dollberg updated this revision to Diff 236230.
stephan.dollberg added a comment.
Rebased
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71804/new/
https://reviews.llvm.org/D71804
Files:
llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
llvm/include/llvm/ExecutionEngine/Orc/RPC/RPCUtils.h
llvm/include/llvm/Support/TaskQueue.h
Index: llvm/include/llvm/Support/TaskQueue.h
===================================================================
--- llvm/include/llvm/Support/TaskQueue.h
+++ llvm/include/llvm/Support/TaskQueue.h
@@ -98,7 +98,7 @@
IsTaskInFlight = true;
}
}
- return std::move(F);
+ return F;
}
private:
Index: llvm/include/llvm/ExecutionEngine/Orc/RPC/RPCUtils.h
===================================================================
--- llvm/include/llvm/ExecutionEngine/Orc/RPC/RPCUtils.h
+++ llvm/include/llvm/ExecutionEngine/Orc/RPC/RPCUtils.h
@@ -1528,20 +1528,20 @@
Args...)) {
detail::ResultTraits<typename Func::ReturnType>::consumeAbandoned(
std::move(Result));
- return std::move(Err);
+ return Err;
}
if (auto Err = this->C.send()) {
detail::ResultTraits<typename Func::ReturnType>::consumeAbandoned(
std::move(Result));
- return std::move(Err);
+ return Err;
}
while (!ReceivedResponse) {
if (auto Err = this->handleOne()) {
detail::ResultTraits<typename Func::ReturnType>::consumeAbandoned(
std::move(Result));
- return std::move(Err);
+ return Err;
}
}
Index: llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
===================================================================
--- llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
+++ llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
@@ -405,7 +405,7 @@
if (auto Sym = LD.findSymbol(BaseLayer, MangledName, false))
continue;
else if (auto Err = Sym.takeError())
- return std::move(Err);
+ return Err;
}
// Record all functions defined by this module.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71804.236230.patch
Type: text/x-patch
Size: 1792 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200105/045804bd/attachment.bin>
More information about the llvm-commits
mailing list