Skip to content

Commit 0377438

Browse files
authored
Revert "Remove redundant move in return statement (#90546)"
This reverts commit db532ff.
1 parent 0140ba0 commit 0377438

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class TrampolinePool {
7777
std::lock_guard<std::mutex> Lock(TPMutex);
7878
if (AvailableTrampolines.empty()) {
7979
if (auto Err = grow())
80-
return Err;
80+
return std::move(Err);
8181
}
8282
assert(!AvailableTrampolines.empty() && "Failed to grow trampoline pool");
8383
auto TrampolineAddr = AvailableTrampolines.back();

llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -488,18 +488,18 @@ class LLJITBuilderSetters {
488488
/// Create an instance of the JIT.
489489
Expected<std::unique_ptr<JITType>> create() {
490490
if (auto Err = impl().prepareForConstruction())
491-
return Err;
491+
return std::move(Err);
492492

493493
Error Err = Error::success();
494494
std::unique_ptr<JITType> J(new JITType(impl(), Err));
495495
if (Err)
496-
return Err;
496+
return std::move(Err);
497497

498498
if (impl().NotifyCreated)
499499
if (Error Err = impl().NotifyCreated(*J))
500-
return Err;
500+
return std::move(Err);
501501

502-
return J;
502+
return std::move(J);
503503
}
504504

505505
protected:

0 commit comments

Comments
 (0)