[llvm] d3c3045 - [TableGen] Use ListSeparator (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 13 20:42:08 PST 2021
Author: Kazu Hirata
Date: 2021-02-13T20:41:36-08:00
New Revision: d3c304534447dc73757bc99cb49e9fc63e5b00fd
URL: https://github.com/llvm/llvm-project/commit/d3c304534447dc73757bc99cb49e9fc63e5b00fd
DIFF: https://github.com/llvm/llvm-project/commit/d3c304534447dc73757bc99cb49e9fc63e5b00fd.diff
LOG: [TableGen] Use ListSeparator (NFC)
Added:
Modified:
llvm/utils/TableGen/AsmMatcherEmitter.cpp
Removed:
################################################################################
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
index 147fd5c9b9b2..e9aa9cdad5e5 100644
--- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
@@ -3509,12 +3509,9 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
OS << '_' << MI->RequiredFeatures[i]->TheDef->getName();
OS << ", { ";
- for (unsigned i = 0, e = MI->AsmOperands.size(); i != e; ++i) {
- const MatchableInfo::AsmOperand &Op = MI->AsmOperands[i];
-
- if (i) OS << ", ";
- OS << Op.Class->Name;
- }
+ ListSeparator LS;
+ for (const MatchableInfo::AsmOperand &Op : MI->AsmOperands)
+ OS << LS << Op.Class->Name;
OS << " }, },\n";
}
More information about the llvm-commits
mailing list