[TableGen] Use llvm::erase_if (NFC)
authorKazu Hirata <kazu@google.com>
Sat, 26 Dec 2020 20:06:25 +0000 (12:06 -0800)
committerKazu Hirata <kazu@google.com>
Sat, 26 Dec 2020 20:06:26 +0000 (12:06 -0800)
llvm/utils/TableGen/AsmWriterEmitter.cpp

index 9a59088..3e27bd7 100644 (file)
@@ -522,10 +522,8 @@ void AsmWriterEmitter::EmitPrintInstruction(
   }
 
   // Okay, delete instructions with no operand info left.
-  auto I = llvm::remove_if(Instructions,
-                     [](AsmWriterInst &Inst) { return Inst.Operands.empty(); });
-  Instructions.erase(I, Instructions.end());
-
+  llvm::erase_if(Instructions,
+                 [](AsmWriterInst &Inst) { return Inst.Operands.empty(); });
 
   // Because this is a vector, we want to emit from the end.  Reverse all of the
   // elements in the vector.