[PATCH] D75411: [mlir][ods] Add query for derived attribute

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 2 12:03:45 PST 2020


rriddle accepted this revision.
rriddle added inline comments.
This revision is now accepted and ready to land.


================
Comment at: mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp:401
+  auto &body = method.body();
+  body << "  return llvm::StringSwitch<bool>(name)";
+  for (auto namedAttr : op.getAttributes())
----------------
nit: Can we just use llvm::is_contained instead? That would avoid bringing in StringSwitch to OperationSupport, which is included in a lot of places.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75411/new/

https://reviews.llvm.org/D75411





More information about the llvm-commits mailing list