[llvm-branch-commits] [llvm] 63a2bde - [TableGen] Use llvm::erase_if (NFC)
Kazu Hirata via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sat Dec 26 12:11:51 PST 2020
Author: Kazu Hirata
Date: 2020-12-26T12:06:26-08:00
New Revision: 63a2bde2812a45894331e35e0402aa647b22aecd
URL: https://github.com/llvm/llvm-project/commit/63a2bde2812a45894331e35e0402aa647b22aecd
DIFF: https://github.com/llvm/llvm-project/commit/63a2bde2812a45894331e35e0402aa647b22aecd.diff
LOG: [TableGen] Use llvm::erase_if (NFC)
Added:
Modified:
llvm/utils/TableGen/AsmWriterEmitter.cpp
Removed:
################################################################################
diff --git a/llvm/utils/TableGen/AsmWriterEmitter.cpp b/llvm/utils/TableGen/AsmWriterEmitter.cpp
index 9a5908827b4e..3e27bd78b376 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.
More information about the llvm-branch-commits
mailing list