[Mlir-commits] [mlir] d1883bc - [mlir][NFC] Use explicit ::mlir namespace in mlir-tblgen generated code
Vladislav Vinogradov
llvmlistbot at llvm.org
Fri Aug 20 01:51:24 PDT 2021
Author: Vladislav Vinogradov
Date: 2021-08-20T11:52:25+03:00
New Revision: d1883bc3220d58dec96278abeb98590df8801044
URL: https://github.com/llvm/llvm-project/commit/d1883bc3220d58dec96278abeb98590df8801044
DIFF: https://github.com/llvm/llvm-project/commit/d1883bc3220d58dec96278abeb98590df8801044.diff
LOG: [mlir][NFC] Use explicit ::mlir namespace in mlir-tblgen generated code
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D108376
Added:
Modified:
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
Removed:
################################################################################
diff --git a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
index 269803f50788f..d2b921fb5dd49 100644
--- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
@@ -1058,7 +1058,7 @@ void OpEmitter::genSeparateArgParamBuilder() {
// TODO: Expand to handle regions.
body << formatv(R"(
::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
- if (succeeded({0}::inferReturnTypes(odsBuilder.getContext(),
+ if (::mlir::succeeded({0}::inferReturnTypes(odsBuilder.getContext(),
{1}.location, {1}.operands,
{1}.attributes.getDictionary({1}.getContext()),
/*regions=*/{{}, inferredReturnTypes)))
@@ -1195,7 +1195,7 @@ void OpEmitter::genInferredTypeCollectiveParamBuilder() {
// Result types
body << formatv(R"(
::mlir::SmallVector<::mlir::Type, 2> inferredReturnTypes;
- if (succeeded({0}::inferReturnTypes(odsBuilder.getContext(),
+ if (::mlir::succeeded({0}::inferReturnTypes(odsBuilder.getContext(),
{1}.location, operands,
{1}.attributes.getDictionary({1}.getContext()),
/*regions=*/{{}, inferredReturnTypes))) {{)",
@@ -1914,7 +1914,7 @@ void OpEmitter::genPrinter() {
void OpEmitter::genVerifier() {
auto *method = opClass.addMethodAndPrune("::mlir::LogicalResult", "verify");
auto &body = method->body();
- body << " if (failed(" << op.getAdaptorName()
+ body << " if (::mlir::failed(" << op.getAdaptorName()
<< "(*this).verify((*this)->getLoc()))) "
<< "return ::mlir::failure();\n";
More information about the Mlir-commits
mailing list