message: Skip generating C++ for "DeclareOpInterfaceMethods" in op interface gen.
  This is needed for calling the generator on a .td file that contains both OpInterface definitions and op definitions with DeclareOpInterfaceMethods<...> Traits.
diff: @@ -51,6 +51,19 @@ static void emitMethodNameAndArgs(const OpInterfaceMethod &method,
  os << ')';
  }
  +// Get an array of all OpInterface definitions but exclude those subclassing
  +// "DeclareOpInterfaceMethods".
  +static std::vector<Record *>
  +getAllOpInterfaceDefinitions(const RecordKeeper &recordKeeper) {
  + std::vector<Record *> defs =
  + recordKeeper.getAllDerivedDefinitions("OpInterface");
  +
  + llvm::erase_if(defs, [](const Record *def) {
  + return def->isSubClassOf("DeclareOpInterfaceMethods");
  + });
  + return defs;
  +}
  +
  //===----------------------------------------------------------------------===//
  // GEN: Interface definitions
  //===----------------------------------------------------------------------===//
  @@ -78,8 +91,7 @@ static bool emitInterfaceDefs(const RecordKeeper &recordKeeper,
  raw_ostream &os) {
  llvm::emitSourceFileHeader("Operation Interface Definitions", os);
  - auto defs = recordKeeper.getAllDerivedDefinitions("OpInterface");
  - for (const auto *def : defs) {
  + for (const auto *def : getAllOpInterfaceDefinitions(recordKeeper)) {
  OpInterface interface(def);
  emitInterfaceDef(interface, os);
  }
  @@ -169,8 +181,7 @@ static bool emitInterfaceDecls(const RecordKeeper &recordKeeper,
  raw_ostream &os) {
  llvm::emitSourceFileHeader("Operation Interface Declarations", os);
  - auto defs = recordKeeper.getAllDerivedDefinitions("OpInterface");
  - for (const auto *def : defs) {
  + for (const auto *def : getAllOpInterfaceDefinitions(recordKeeper)) {
  OpInterface interface(def);
  emitInterfaceDecl(interface, os);
  }
  @@ -230,8 +241,7 @@ static bool emitInterfaceDocs(const RecordKeeper &recordKeeper,
  os << "<!-- Autogenerated by mlir-tblgen; don't manually edit -->\n";
  os << "# Operation Interface definition\n";
  - auto defs = recordKeeper.getAllDerivedDefinitions("OpInterface");
  - for (const auto *def : defs)
  + for (const auto *def : getAllOpInterfaceDefinitions(recordKeeper))
  emitInterfaceDoc(*def, os);
  return false;
  }
  