[Mlir-commits] [mlir] d01f559 - [mlir] Fix c++20 compat warning. NFC. (#65801)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Sep 8 13:23:40 PDT 2023
Author: Jakub Kuderski
Date: 2023-09-08T16:23:36-04:00
New Revision: d01f559ce9eedc7ab036b5a9e3d03fc861bc6a5d
URL: https://github.com/llvm/llvm-project/commit/d01f559ce9eedc7ab036b5a9e3d03fc861bc6a5d
DIFF: https://github.com/llvm/llvm-project/commit/d01f559ce9eedc7ab036b5a9e3d03fc861bc6a5d.diff
LOG: [mlir] Fix c++20 compat warning. NFC. (#65801)
`concept` is a c++20 keyword and makes some buildbots fail:
https://lab.llvm.org/buildbot/#/builders/160/builds/24345
Added:
Modified:
mlir/test/mlir-tblgen/op-interface.td
mlir/tools/mlir-tblgen/OpInterfacesGen.cpp
Removed:
################################################################################
diff --git a/mlir/test/mlir-tblgen/op-interface.td b/mlir/test/mlir-tblgen/op-interface.td
index 6ca9f15bd022097..17bd631fe250d16 100644
--- a/mlir/test/mlir-tblgen/op-interface.td
+++ b/mlir/test/mlir-tblgen/op-interface.td
@@ -11,10 +11,10 @@ def ExtraClassOfInterface : OpInterface<"ExtraClassOfInterface"> {
// DECL: class ExtraClassOfInterface
// DECL: static bool classof(::mlir::Operation * base) {
-// DECL-NEXT: auto* concept = getInterfaceFor(base);
-// DECL-NEXT: if (!concept)
+// DECL-NEXT: auto* interface = getInterfaceFor(base);
+// DECL-NEXT: if (!interface)
// DECL-NEXT: return false;
-// DECL-NEXT: ExtraClassOfInterface odsInterfaceInstance(base, concept);
+// DECL-NEXT: ExtraClassOfInterface odsInterfaceInstance(base, interface);
// DECL-NEXT: return odsInterfaceInstance->someOtherMethod();
// DECL-NEXT: }
diff --git a/mlir/tools/mlir-tblgen/OpInterfacesGen.cpp b/mlir/tools/mlir-tblgen/OpInterfacesGen.cpp
index bdc8482ce5d2724..65c1e6392b1316e 100644
--- a/mlir/tools/mlir-tblgen/OpInterfacesGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpInterfacesGen.cpp
@@ -584,10 +584,10 @@ void InterfaceGenerator::emitInterfaceDecl(const Interface &interface) {
auto extraClassOfFmt = tblgen::FmtContext();
extraClassOfFmt.addSubst(substVar, "odsInterfaceInstance");
os << " static bool classof(" << valueType << " base) {\n"
- << " auto* concept = getInterfaceFor(base);\n"
- << " if (!concept)\n"
+ << " auto* interface = getInterfaceFor(base);\n"
+ << " if (!interface)\n"
" return false;\n"
- " " << interfaceName << " odsInterfaceInstance(base, concept);\n"
+ " " << interfaceName << " odsInterfaceInstance(base, interface);\n"
<< " " << tblgen::tgfmt(extraClassOf->trim(), &extraClassOfFmt)
<< "\n }\n";
}
More information about the Mlir-commits
mailing list