[Mlir-commits] [mlir] [mlir] load dialect in parser for optional parameters (PR #96667)
Jeremy Kun
llvmlistbot at llvm.org
Fri Jun 28 15:26:19 PDT 2024
================
@@ -424,9 +424,11 @@ void DefFormat::genVariableParser(ParameterElement *el, FmtContext &ctx,
Dialect dialect(dialectInit->getDef());
auto cppNamespace = dialect.getCppNamespace();
std::string name = dialect.getCppClassName();
- dialectLoading = ("\nodsParser.getContext()->getOrLoadDialect<" +
- cppNamespace + "::" + name + ">();")
- .str();
+ if (name != "BuiltinDialect" || cppNamespace != "::mlir") {
----------------
j2kun wrote:
I could also alternatively have getOrLoadDialect be aware of `BuiltinDialect` and handle it specially.
https://github.com/llvm/llvm-project/pull/96667
More information about the Mlir-commits
mailing list