[llvm] [mlir] [MLIR][TableGen] Minor code cleanup in DirectiveCommonGen (PR #110290)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 29 08:23:08 PDT 2024


================
@@ -84,11 +83,9 @@ static bool emitDecls(const RecordKeeper &recordKeeper, llvm::StringRef dialect,
     os << "  \"Clause" << enumName << "\",\n";
     os << "  \"" << enumName << " Clause\",\n";
     os << "  [";
-    for (unsigned int i = 0; i < cvDefs.size(); i++) {
-      os << cvDefs[i];
-      if (i != cvDefs.size() - 1)
-        os << ",";
-    }
+    llvm::ListSeparator LS;
+    for (const auto &cvDef : cvDefs)
----------------
jurahul wrote:

Done.

https://github.com/llvm/llvm-project/pull/110290


More information about the llvm-commits mailing list