[PATCH] D88344: Fix useless move() in IRCompileLayer.h
Maksim Ivanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 25 16:01:13 PDT 2020
emaxx created this revision.
emaxx added a reviewer: lhames.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
emaxx requested review of this revision.
Drop std::move() calls in places where there's no actual moving
happing, and only the "bugprone-use-after-move" clang-tidy
warning is triggered.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D88344
Files:
llvm/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h
Index: llvm/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h
===================================================================
--- llvm/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h
+++ llvm/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h
@@ -110,10 +110,10 @@
auto Obj = Compile(*M);
if (!Obj)
return Obj.takeError();
- if (auto Err = BaseLayer.addObject(std::move(K), std::move(*Obj)))
+ if (auto Err = BaseLayer.addObject(K, std::move(*Obj)))
return Err;
if (NotifyCompiled)
- NotifyCompiled(std::move(K), std::move(M));
+ NotifyCompiled(K, std::move(M));
return Error::success();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88344.294445.patch
Type: text/x-patch
Size: 650 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200925/7ff62fc6/attachment.bin>
More information about the llvm-commits
mailing list