[Mlir-commits] [mlir] 655662e - [MLIR][ODS] Fully qualify namespace for mlir::Attribute in ODS generated code (#168536)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Nov 19 05:05:41 PST 2025
Author: BogdanDragosV
Date: 2025-11-19T13:05:36Z
New Revision: 655662e94e969ee1bb3c17ea036335d7865f0462
URL: https://github.com/llvm/llvm-project/commit/655662e94e969ee1bb3c17ea036335d7865f0462
DIFF: https://github.com/llvm/llvm-project/commit/655662e94e969ee1bb3c17ea036335d7865f0462.diff
LOG: [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.
Added:
Modified:
mlir/include/mlir/IR/Properties.td
Removed:
################################################################################
diff --git a/mlir/include/mlir/IR/Properties.td b/mlir/include/mlir/IR/Properties.td
index a7ade0675b9bb..2830ba96fb787 100644
--- a/mlir/include/mlir/IR/Properties.td
+++ b/mlir/include/mlir/IR/Properties.td
@@ -468,7 +468,7 @@ class ArrayProp<Property elem = Property<>, string newSummary = ""> :
return $_diag() << "expected array attribute";
for (::mlir::Attribute elemAttr : arrayAttr) {
}] # _makePropStorage<elem, "elemVal">.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<Property elem = Property<>, string newSummary = ""> :
}];
let convertToAttribute = [{
- SmallVector<Attribute> 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<Property p, bit canDelegateParsing = 1>
}
::mlir::Attribute presentAttr = arrayAttr[0];
}] # _makePropStorage<p, "presentVal">.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);
More information about the Mlir-commits
mailing list