[llvm] Convert copy to r-value reference. (PR #85606)
Malay Sanghi via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 18 00:03:50 PDT 2024
https://github.com/MalaySanghiIntel created https://github.com/llvm/llvm-project/pull/85606
That seems to be the intention based on calling code.
>From 748dcd48e666db495f8e5fca2f91544e8c45fb5b Mon Sep 17 00:00:00 2001
From: Malay Sanghi <malay.sanghi at intel.com>
Date: Mon, 18 Mar 2024 00:02:10 -0700
Subject: [PATCH] Convert copy to r-value reference
That seems to be the intention based on calling code.
---
llvm/include/llvm/CodeGen/MachinePassManager.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/include/llvm/CodeGen/MachinePassManager.h b/llvm/include/llvm/CodeGen/MachinePassManager.h
index b1166e3a3fd529..3faffe5c4cab29 100644
--- a/llvm/include/llvm/CodeGen/MachinePassManager.h
+++ b/llvm/include/llvm/CodeGen/MachinePassManager.h
@@ -56,7 +56,7 @@ struct MachinePassConcept
};
template <typename PassT> struct MachinePassModel : MachinePassConcept {
- explicit MachinePassModel(PassT Pass) : Pass(std::move(Pass)) {}
+ explicit MachinePassModel(PassT &&Pass) : Pass(std::move(Pass)) {}
// We have to explicitly define all the special member functions because MSVC
// refuses to generate them.
MachinePassModel(const MachinePassModel &Arg) : Pass(Arg.Pass) {}
More information about the llvm-commits
mailing list