[llvm] 71d12bc - [ExecutionEngine] Fix warnings
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 15 10:26:08 PDT 2022
Author: Kazu Hirata
Date: 2022-08-15T10:26:03-07:00
New Revision: 71d12bc2de0b353496e1833abb9f21f9fba4b1f2
URL: https://github.com/llvm/llvm-project/commit/71d12bc2de0b353496e1833abb9f21f9fba4b1f2
DIFF: https://github.com/llvm/llvm-project/commit/71d12bc2de0b353496e1833abb9f21f9fba4b1f2.diff
LOG: [ExecutionEngine] Fix warnings
This patch fixes:
llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp:512:12: error:
moving a temporary object prevents copy elision
[-Werror,-Wpessimizing-move]
and:
llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp:515:12: error:
moving a temporary object prevents copy elision
[-Werror,-Wpessimizing-move]
Added:
Modified:
llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp b/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
index da96a5910122b..2577318e83263 100644
--- a/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
@@ -509,10 +509,10 @@ DLLImportDefinitionGenerator::createStubsGraph(const SymbolMap &Resolved) {
Triple TT = ES.getExecutorProcessControl().getTargetTriple();
auto PointerSize = getTargetEndianness(TT);
if (!PointerSize)
- return std::move(PointerSize.takeError());
+ return PointerSize.takeError();
auto Endianness = getTargetEndianness(TT);
if (!Endianness)
- return std::move(Endianness.takeError());
+ return Endianness.takeError();
auto G = std::make_unique<jitlink::LinkGraph>(
"<DLLIMPORT_STUBS>", TT, *PointerSize, *Endianness,
More information about the llvm-commits
mailing list