[Mlir-commits] [mlir] f4d78a5 - [mlir][NFC] Add missing namespace qualifier to ODS generated code
Vladislav Vinogradov
llvmlistbot at llvm.org
Thu Feb 25 07:14:36 PST 2021
Author: Vladislav Vinogradov
Date: 2021-02-25T17:48:32+03:00
New Revision: f4d78a5e3aee53d46e0f13e77f08ee610bade7fc
URL: https://github.com/llvm/llvm-project/commit/f4d78a5e3aee53d46e0f13e77f08ee610bade7fc
DIFF: https://github.com/llvm/llvm-project/commit/f4d78a5e3aee53d46e0f13e77f08ee610bade7fc.diff
LOG: [mlir][NFC] Add missing namespace qualifier to ODS generated code
Use `::mlir::Region` inside array ref for `VariadicRegion`.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D97376
Added:
Modified:
mlir/test/mlir-tblgen/op-decl.td
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
Removed:
################################################################################
diff --git a/mlir/test/mlir-tblgen/op-decl.td b/mlir/test/mlir-tblgen/op-decl.td
index f15c5c6a6a1b..dffb0224a059 100644
--- a/mlir/test/mlir-tblgen/op-decl.td
+++ b/mlir/test/mlir-tblgen/op-decl.td
@@ -76,7 +76,7 @@ def NS_AOp : NS_Op<"a_op", [IsolatedFromAbove, IsolatedFromAbove]> {
// CHECK: ::mlir::Operation::result_range getODSResults(unsigned index);
// CHECK: ::mlir::Value r();
// CHECK: ::mlir::Region &someRegion();
-// CHECK: ::mlir::MutableArrayRef<Region> someRegions();
+// CHECK: ::mlir::MutableArrayRef<::mlir::Region> someRegions();
// CHECK: ::mlir::IntegerAttr attr1Attr()
// CHECK: uint32_t attr1();
// CHECK: ::mlir::FloatAttr attr2Attr()
diff --git a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
index 52ce37eb79ab..8c124280989f 100644
--- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
@@ -1014,8 +1014,8 @@ void OpEmitter::genNamedRegionGetters() {
// Generate the accessors for a variadic region.
if (region.isVariadic()) {
- auto *m = opClass.addMethodAndPrune("::mlir::MutableArrayRef<Region>",
- region.name);
+ auto *m = opClass.addMethodAndPrune(
+ "::mlir::MutableArrayRef<::mlir::Region>", region.name);
m->body() << formatv(" return (*this)->getRegions().drop_front({0});",
i);
continue;
More information about the Mlir-commits
mailing list