Skip to content

Commit db532ff

Browse files
Remove redundant move in return statement (#90546)
This pull request removes unnecessary move in the return statement to suppress compilation warnings. Co-authored-by: Xiaolei Shi <[email protected]>
1 parent 1500dc0 commit db532ff

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 std::move(Err);
80+
return 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 std::move(Err);
491+
return Err;
492492

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

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

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

505505
protected:

0 commit comments

Comments
 (0)