[Mlir-commits] [mlir] [mlir] load dialect in parser for optional	parameters (PR #96667)
    Jeremy Kun 
    llvmlistbot at llvm.org
       
    Fri Jun 28 15:25:27 PDT 2024
    
    
  
================
@@ -112,6 +130,9 @@ struct FieldParser<
     std::enable_if_t<std::is_base_of<Attribute, AttributeT>::value,
                      std::optional<AttributeT>>> {
   static FailureOr<std::optional<AttributeT>> parse(AsmParser &parser) {
+    if constexpr (HasStaticDialectName<AttributeT>::value) {
+      parser.getContext()->getOrLoadDialect(AttributeT::dialectName);
----------------
j2kun wrote:
AFAICT TypeID is not static on `Attribute`, nor part of the `tbl-gen` generated code.
https://github.com/llvm/llvm-project/pull/96667
    
    
More information about the Mlir-commits
mailing list