[llvm] ef8d814 - Revert "Remove redundant move in return statement" (#91169)
via llvm-commits
llvm-commits at lists.llvm.org
Mon May 6 00:50:09 PDT 2024
Author: Mehdi Amini
Date: 2024-05-06T15:50:06+08:00
New Revision: ef8d8148b448f9bbeef7cee7bf4f82e3233111cd
URL: https://github.com/llvm/llvm-project/commit/ef8d8148b448f9bbeef7cee7bf4f82e3233111cd
DIFF: https://github.com/llvm/llvm-project/commit/ef8d8148b448f9bbeef7cee7bf4f82e3233111cd.diff
LOG: Revert "Remove redundant move in return statement" (#91169)
Reverts llvm/llvm-project#90546
This broke some bots, seems like some toolchain don’t consider the
implicit move here.
Added:
Modified:
llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h
llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h b/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h
index 6dd99a76cf2afb..f0263e0d78e75e 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h
@@ -77,7 +77,7 @@ class TrampolinePool {
std::lock_guard<std::mutex> Lock(TPMutex);
if (AvailableTrampolines.empty()) {
if (auto Err = grow())
- return Err;
+ return std::move(Err);
}
assert(!AvailableTrampolines.empty() && "Failed to grow trampoline pool");
auto TrampolineAddr = AvailableTrampolines.back();
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h b/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
index 2608a95e40a36b..3a71ddc88ce956 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
@@ -488,18 +488,18 @@ class LLJITBuilderSetters {
/// Create an instance of the JIT.
Expected<std::unique_ptr<JITType>> create() {
if (auto Err = impl().prepareForConstruction())
- return Err;
+ return std::move(Err);
Error Err = Error::success();
std::unique_ptr<JITType> J(new JITType(impl(), Err));
if (Err)
- return Err;
+ return std::move(Err);
if (impl().NotifyCreated)
if (Error Err = impl().NotifyCreated(*J))
- return Err;
+ return std::move(Err);
- return J;
+ return std::move(J);
}
protected:
More information about the llvm-commits
mailing list