[llvm] e718869 - [TableGen] Use ListSeparator (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 30 09:54:03 PST 2021
Author: Kazu Hirata
Date: 2021-01-30T09:53:39-08:00
New Revision: e718869bf47af20be0ec7301846f78c82d0f1140
URL: https://github.com/llvm/llvm-project/commit/e718869bf47af20be0ec7301846f78c82d0f1140
DIFF: https://github.com/llvm/llvm-project/commit/e718869bf47af20be0ec7301846f78c82d0f1140.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 9d304910ba4e..8b30fd709dd9 100644
--- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
@@ -2883,14 +2883,10 @@ static void emitCustomOperandParsing(raw_ostream &OS, CodeGenTarget &Target,
OS << OMI.OperandMask;
OS << " /* ";
- bool printComma = false;
+ ListSeparator LS;
for (int i = 0, e = 31; i !=e; ++i)
- if (OMI.OperandMask & (1 << i)) {
- if (printComma)
- OS << ", ";
- OS << i;
- printComma = true;
- }
+ if (OMI.OperandMask & (1 << i))
+ OS << LS << i;
OS << " */, ";
OS << OMI.CI->Name;
More information about the llvm-commits
mailing list