[llvm] r340819 - [TableGen] Use std::move where possible in InstructionMemo constructor. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 28 04:10:27 PDT 2018
Author: rksimon
Date: Tue Aug 28 04:10:27 2018
New Revision: 340819
URL: http://llvm.org/viewvc/llvm-project?rev=340819&view=rev
Log:
[TableGen] Use std::move where possible in InstructionMemo constructor. NFCI.
Requested in post-commit review for rL339670
Modified:
llvm/trunk/utils/TableGen/FastISelEmitter.cpp
Modified: llvm/trunk/utils/TableGen/FastISelEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/FastISelEmitter.cpp?rev=340819&r1=340818&r2=340819&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/FastISelEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/FastISelEmitter.cpp Tue Aug 28 04:10:27 2018
@@ -39,12 +39,12 @@ struct InstructionMemo {
std::vector<std::string> PhysRegs;
std::string PredicateCheck;
- InstructionMemo(const std::string &Name, const CodeGenRegisterClass *RC,
- const std::string &SubRegNo,
- const std::vector<std::string> &PhysRegs,
- const std::string &PredicateCheck)
- : Name(Name), RC(RC), SubRegNo(SubRegNo), PhysRegs(PhysRegs),
- PredicateCheck(PredicateCheck) {}
+ InstructionMemo(StringRef Name, const CodeGenRegisterClass *RC,
+ std::string SubRegNo, std::vector<std::string> PhysRegs,
+ std::string PredicateCheck)
+ : Name(Name), RC(RC), SubRegNo(std::move(SubRegNo)),
+ PhysRegs(std::move(PhysRegs)),
+ PredicateCheck(std::move(PredicateCheck)) {}
// Make sure we do not copy InstructionMemo.
InstructionMemo(const InstructionMemo &Other) = delete;
More information about the llvm-commits
mailing list