[Mlir-commits] [mlir] [NFC] Improve readability of AttrHelper usage (PR #135873)
Simon Waters
llvmlistbot at llvm.org
Wed Apr 16 11:36:20 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:
Nothing really, just adding for convenience. I was asked on a dialect in a separate project to make usage of AttrHelpers cleaner.
https://github.com/llvm/llvm-project/pull/135873
More information about the Mlir-commits
mailing list