From 63a2bde2812a45894331e35e0402aa647b22aecd Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 26 Dec 2020 12:06:25 -0800 Subject: [PATCH] [TableGen] Use llvm::erase_if (NFC) --- llvm/utils/TableGen/AsmWriterEmitter.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/llvm/utils/TableGen/AsmWriterEmitter.cpp b/llvm/utils/TableGen/AsmWriterEmitter.cpp index 9a59088..3e27bd7 100644 --- a/llvm/utils/TableGen/AsmWriterEmitter.cpp +++ b/llvm/utils/TableGen/AsmWriterEmitter.cpp @@ -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. -- 2.7.4