[TableGen] Use ListSeparator (NFC)
authorKazu Hirata <kazu@google.com>
Fri, 19 Feb 2021 06:46:39 +0000 (22:46 -0800)
committerKazu Hirata <kazu@google.com>
Fri, 19 Feb 2021 06:46:39 +0000 (22:46 -0800)
llvm/utils/TableGen/DFAEmitter.cpp

index 781cb06..a5cba04 100644 (file)
@@ -376,11 +376,9 @@ void CustomDfaEmitter::printActionValue(action_type A, raw_ostream &OS) {
   const ActionTuple &AT = Actions[A];
   if (AT.size() > 1)
     OS << "std::make_tuple(";
-  bool First = true;
+  ListSeparator LS;
   for (const auto &SingleAction : AT) {
-    if (!First)
-      OS << ", ";
-    First = false;
+    OS << LS;
     SingleAction.print(OS);
   }
   if (AT.size() > 1)