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

Simon Waters llvmlistbot at llvm.org
Tue Apr 15 16:42:34 PDT 2025


================
@@ -341,7 +349,17 @@ static const char *const dialectDestructorStr = R"(
 {0}::~{0}() = default;
 
 )";
+  
+/// The code block to generate a member funcs.
+///
+/// {0}: The name of the dialect class.
+static const char *const dialectStaticMemberDefs = R"(
+const {0} *{0}::getLoaded(::mlir::Operation *operation) {{
----------------
sjw36 wrote:

The dialect of the operation may not be the same dialect that owns the attribute though.

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


More information about the Mlir-commits mailing list