[TableGen] Pass string/vector types by const reference (PR37666). NFCI
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 14 Aug 2018 11:17:38 +0000 (11:17 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 14 Aug 2018 11:17:38 +0000 (11:17 +0000)
llvm-svn: 339670

llvm/utils/TableGen/FastISelEmitter.cpp

index c0902e4..b1ae683 100644 (file)
@@ -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;