[Mlir-commits] [mlir] a9e8b1e - [mlir] Fully qualify default types used in parser code
Markus Böck
llvmlistbot at llvm.org
Fri Dec 24 13:25:58 PST 2021
Author: Markus Böck
Date: 2021-12-24T22:25:50+01:00
New Revision: a9e8b1ee7fd44b53c555a7823ae8fd1a8209c520
URL: https://github.com/llvm/llvm-project/commit/a9e8b1ee7fd44b53c555a7823ae8fd1a8209c520
DIFF: https://github.com/llvm/llvm-project/commit/a9e8b1ee7fd44b53c555a7823ae8fd1a8209c520.diff
LOG: [mlir] Fully qualify default types used in parser code
Added:
Modified:
mlir/tools/mlir-tblgen/OpFormatGen.cpp
Removed:
################################################################################
diff --git a/mlir/tools/mlir-tblgen/OpFormatGen.cpp b/mlir/tools/mlir-tblgen/OpFormatGen.cpp
index 2b5767e325679..adbd8407af999 100644
--- a/mlir/tools/mlir-tblgen/OpFormatGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpFormatGen.cpp
@@ -1291,7 +1291,7 @@ void OperationFormat::genElementParser(Element *element, MethodBody &body,
llvm::raw_string_ostream os(attrTypeStr);
os << tgfmt(*typeBuilder, &attrTypeCtx);
} else {
- attrTypeStr = "Type{}";
+ attrTypeStr = "::mlir::Type{}";
}
if (var->attr.isOptional()) {
body << formatv(optionalAttrParserCode, var->name, attrTypeStr);
@@ -1375,7 +1375,7 @@ void OperationFormat::genElementParser(Element *element, MethodBody &body,
listName);
})
.Default([&](auto operand) {
- body << formatv(typeParserCode, "Type", listName);
+ body << formatv(typeParserCode, "::mlir::Type", listName);
});
}
} else if (auto *dir = dyn_cast<FunctionalTypeDirective>(element)) {
@@ -1517,7 +1517,7 @@ void OperationFormat::genParserOperandTypeResolution(
// once. Use llvm::concat to perform the merge. llvm::concat does not allow
// the case of a single range, so guard it here.
if (op.getNumOperands() > 1) {
- body << "::llvm::concat<const Type>(";
+ body << "::llvm::concat<const ::mlir::Type>(";
llvm::interleaveComma(
llvm::seq<int>(0, op.getNumOperands()), body, [&](int i) {
body << "::llvm::ArrayRef<::mlir::Type>(";
More information about the Mlir-commits
mailing list