diff --git a/mlir/test/mlir-tblgen/op-attribute.td b/mlir/test/mlir-tblgen/op-attribute.td --- a/mlir/test/mlir-tblgen/op-attribute.td +++ b/mlir/test/mlir-tblgen/op-attribute.td @@ -80,7 +80,7 @@ // Test remove methods // --- -// DEF: Attribute AOp::removeCAttrAttr() { +// DEF: ::mlir::Attribute AOp::removeCAttrAttr() { // DEF-NEXT: return (*this)->removeAttr("cAttr"); // Test build methods @@ -271,7 +271,7 @@ // DEF: bool UnitAttrOp::attr() { // DEF: return {{.*}} != nullptr -// DEF: Attribute UnitAttrOp::removeAttrAttr() { +// DEF: ::mlir::Attribute UnitAttrOp::removeAttrAttr() { // DEF-NEXT: (*this)->removeAttr("attr"); // DEF: build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::UnitAttr attr) @@ -288,7 +288,7 @@ def Test_Dialect_2 : Dialect { let name = "dialect_2"; } -def MyStruct : StructAttr<"MyStruct", Test_Dialect_2, +def MyStruct : StructAttr<"MyStruct", Test_Dialect_2, [StructFieldAttr<"potatoes", I64ElementsAttr>]> { let description = "A structure describing a number of potatoes."; } diff --git a/mlir/test/mlir-tblgen/op-decl.td b/mlir/test/mlir-tblgen/op-decl.td --- a/mlir/test/mlir-tblgen/op-decl.td +++ b/mlir/test/mlir-tblgen/op-decl.td @@ -81,7 +81,7 @@ // CHECK: uint32_t attr1(); // CHECK: ::mlir::FloatAttr attr2Attr() // CHECK: ::llvm::Optional< ::llvm::APFloat > attr2(); -// CHECK: Attribute removeAttr2Attr(); +// CHECK: ::mlir::Attribute removeAttr2Attr(); // CHECK: static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Value val); // CHECK: static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, int integer = 0); // CHECK: static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type r, ::mlir::TypeRange s, ::mlir::Value a, ::mlir::ValueRange b, ::mlir::IntegerAttr attr1, /*optional*/::mlir::FloatAttr attr2, unsigned someRegionsCount) diff --git a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp --- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp +++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp @@ -788,7 +788,7 @@ auto upperInitial = name.take_front().upper(); auto suffix = name.drop_front(); auto *method = opClass.addMethodAndPrune( - "Attribute", ("remove" + upperInitial + suffix + "Attr").str()); + "::mlir::Attribute", ("remove" + upperInitial + suffix + "Attr").str()); if (!method) return; auto &body = method->body();