Move a vector instead of copying it.
authorCraig Topper <craig.topper@gmail.com>
Tue, 25 Nov 2014 20:11:25 +0000 (20:11 +0000)
committerCraig Topper <craig.topper@gmail.com>
Tue, 25 Nov 2014 20:11:25 +0000 (20:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222779 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/AsmWriterEmitter.cpp

index 4089ede9cfee1506eeabcedfeb77e81b53b8929b..72cd07eca6c71d134d182835ec16ede8e6fbe963 100644 (file)
@@ -350,7 +350,7 @@ void AsmWriterEmitter::EmitPrintInstruction(raw_ostream &O) {
   // in the opcode-indexed table.
   unsigned BitsLeft = 64-AsmStrBits;
 
   // in the opcode-indexed table.
   unsigned BitsLeft = 64-AsmStrBits;
 
-  std::vector<std::vector<std::string> > TableDrivenOperandPrinters;
+  std::vector<std::vector<std::string>> TableDrivenOperandPrinters;
 
   while (1) {
     std::vector<std::string> UniqueOperandCommands;
 
   while (1) {
     std::vector<std::string> UniqueOperandCommands;
@@ -393,7 +393,7 @@ void AsmWriterEmitter::EmitPrintInstruction(raw_ostream &O) {
     }
 
     // Remember the handlers for this set of operands.
     }
 
     // Remember the handlers for this set of operands.
-    TableDrivenOperandPrinters.push_back(UniqueOperandCommands);
+    TableDrivenOperandPrinters.push_back(std::move(UniqueOperandCommands));
   }
 
 
   }