[Mlir-commits] [mlir] [NFC] Improve readability of AttrHelper usage (PR #135873)
Mehdi Amini
llvmlistbot at llvm.org
Wed Apr 16 01:31:29 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) {{
----------------
joker-eph wrote:
This method seems ad-hoc to me and does not provide much convenience compared to the current code.
What's wrong with `getContext().getLoadedDialect<ROCDL::ROCDLDialect>();` ?
https://github.com/llvm/llvm-project/pull/135873
More information about the Mlir-commits
mailing list