From 66b2ae5fc97d6a2569a2b95532e26ec74b13054d Mon Sep 17 00:00:00 2001 From: BogdanDragosV Date: Wed, 19 Nov 2025 15:05:36 +0200 Subject: [PATCH] [MLIR][ODS] Fully qualify namespace for mlir::Attribute in ODS generated code (#168536) ODS generate code can be included and used outside of the `mlir` namespace and so references to symbols in the mlir namespace must be fully qualified. --- mlir/include/mlir/IR/Properties.td | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mlir/include/mlir/IR/Properties.td b/mlir/include/mlir/IR/Properties.td index 212b85876c8d..8c6eb74e30b8 100644 --- a/mlir/include/mlir/IR/Properties.td +++ b/mlir/include/mlir/IR/Properties.td @@ -468,7 +468,7 @@ class ArrayProp, string newSummary = ""> : return $_diag() << "expected array attribute"; for (::mlir::Attribute elemAttr : arrayAttr) { }] # _makePropStorage.ret # [{ - auto elemRes = [&](Attribute propAttr, }] # elem.storageType # [{& propStorage) -> ::mlir::LogicalResult { + auto elemRes = [&](::mlir::Attribute propAttr, }] # elem.storageType # [{& propStorage) -> ::mlir::LogicalResult { }] # !subst("$_attr", "propAttr", !subst("$_storage", "propStorage", elem.convertFromAttribute)) # [{ }(elemAttr, elemVal); @@ -480,7 +480,7 @@ class ArrayProp, string newSummary = ""> : }]; let convertToAttribute = [{ - SmallVector elems; + SmallVector<::mlir::Attribute> elems; for (const auto& elemVal : $_storage) { auto elemAttr = [&](const }] # elem.storageType #[{& propStorage) -> ::mlir::Attribute { }] # !subst("$_storage", "propStorage", elem.convertToAttribute) # [{ @@ -647,7 +647,7 @@ class OptionalProp } ::mlir::Attribute presentAttr = arrayAttr[0]; }] # _makePropStorage.ret # [{ - auto presentRes = [&](Attribute propAttr, }] # p.storageType # [{& propStorage) -> ::mlir::LogicalResult { + auto presentRes = [&](::mlir::Attribute propAttr, }] # p.storageType # [{& propStorage) -> ::mlir::LogicalResult { }] # !subst("$_storage", "propStorage", !subst("$_attr", "propAttr", p.convertFromAttribute)) # [{ }(presentAttr, presentVal);