[llvm] r339670 - [TableGen] Pass string/vector types by const reference (PR37666). NFCI

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 14 04:17:39 PDT 2018


Author: rksimon
Date: Tue Aug 14 04:17:38 2018
New Revision: 339670

URL: http://llvm.org/viewvc/llvm-project?rev=339670&view=rev
Log:
[TableGen] Pass string/vector types by const reference (PR37666). NFCI

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=339670&r1=339669&r2=339670&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/FastISelEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/FastISelEmitter.cpp Tue Aug 14 04:17:38 2018
@@ -39,11 +39,12 @@ struct InstructionMemo {
   std::vector<std::string> PhysRegs;
   std::string PredicateCheck;
 
-  InstructionMemo(std::string Name, const CodeGenRegisterClass *RC,
-                  std::string SubRegNo, std::vector<std::string> PhysRegs,
-                  std::string PredicateCheck)
-    : Name(Name), RC(RC), SubRegNo(SubRegNo), PhysRegs(PhysRegs),
-      PredicateCheck(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) {}
 
   // Make sure we do not copy InstructionMemo.
   InstructionMemo(const InstructionMemo &Other) = delete;




More information about the llvm-commits mailing list