[Mlir-commits] [mlir] [NFC] Improve readability of AttrHelper usage (PR #135873)

River Riddle llvmlistbot at llvm.org
Tue Apr 15 15:49:19 PDT 2025


================
@@ -110,15 +110,23 @@ tblgen::findDialectToGenerate(ArrayRef<Dialect> dialects) {
 /// {2}: The dialect parent class.
 static const char *const dialectDeclBeginStr = R"(
 class {0} : public ::mlir::{2} {
+  typedef {0} DialectType;
   explicit {0}(::mlir::MLIRContext *context);
 
   void initialize();
   friend class ::mlir::MLIRContext;
 public:
   ~{0}() override;
-  static constexpr ::llvm::StringLiteral getDialectNamespace() {
+  static constexpr ::llvm::StringLiteral getDialectNamespace() {{
     return ::llvm::StringLiteral("{1}");
   }
+  static const DialectType *getLoaded(::mlir::MLIRContext &context) {{
----------------
River707 wrote:

I'm not understanding the reasoning behind these changes. When sending a commit for review, please add context as to "why" a change is being proposed.

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


More information about the Mlir-commits mailing list