Skip to content

Commit

Permalink
[mlir] Fully qualify default types used in parser code
Browse files Browse the repository at this point in the history
  • Loading branch information
zero9178 committed Dec 24, 2021
1 parent 5e3403b commit a9e8b1e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mlir/tools/mlir-tblgen/OpFormatGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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>(";
Expand Down

0 comments on commit a9e8b1e

Please sign in to comment.