Skip to content

Commit 655662e

Browse files
[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.
1 parent dce6002 commit 655662e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mlir/include/mlir/IR/Properties.td

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ class ArrayProp<Property elem = Property<>, string newSummary = ""> :
468468
return $_diag() << "expected array attribute";
469469
for (::mlir::Attribute elemAttr : arrayAttr) {
470470
}] # _makePropStorage<elem, "elemVal">.ret # [{
471-
auto elemRes = [&](Attribute propAttr, }] # elem.storageType # [{& propStorage) -> ::mlir::LogicalResult {
471+
auto elemRes = [&](::mlir::Attribute propAttr, }] # elem.storageType # [{& propStorage) -> ::mlir::LogicalResult {
472472
}] # !subst("$_attr", "propAttr",
473473
!subst("$_storage", "propStorage", elem.convertFromAttribute)) # [{
474474
}(elemAttr, elemVal);
@@ -480,7 +480,7 @@ class ArrayProp<Property elem = Property<>, string newSummary = ""> :
480480
}];
481481

482482
let convertToAttribute = [{
483-
SmallVector<Attribute> elems;
483+
SmallVector<::mlir::Attribute> elems;
484484
for (const auto& elemVal : $_storage) {
485485
auto elemAttr = [&](const }] # elem.storageType #[{& propStorage) -> ::mlir::Attribute {
486486
}] # !subst("$_storage", "propStorage", elem.convertToAttribute) # [{
@@ -647,7 +647,7 @@ class OptionalProp<Property p, bit canDelegateParsing = 1>
647647
}
648648
::mlir::Attribute presentAttr = arrayAttr[0];
649649
}] # _makePropStorage<p, "presentVal">.ret # [{
650-
auto presentRes = [&](Attribute propAttr, }] # p.storageType # [{& propStorage) -> ::mlir::LogicalResult {
650+
auto presentRes = [&](::mlir::Attribute propAttr, }] # p.storageType # [{& propStorage) -> ::mlir::LogicalResult {
651651
}] # !subst("$_storage", "propStorage",
652652
!subst("$_attr", "propAttr", p.convertFromAttribute)) # [{
653653
}(presentAttr, presentVal);

0 commit comments

Comments
 (0)