diff --git a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp index 2431807ce463d..edcb2f507ae50 100644 --- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp +++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp @@ -1828,7 +1828,7 @@ void OpEmitter::genPropertiesSupportForBytecode( name, tgfmt(namedProperty->prop.getWriteToMlirBytecodeCall(), &fctx)); continue; } - const auto *namedAttr = attrOrProp.dyn_cast(); + const auto *namedAttr = dyn_cast(attrOrProp); StringRef name = namedAttr->attrName; if (namedAttr->isRequired) { readPropertiesMethod << formatv(R"(