[PATCH] D74143: [MLIR] Adding attribute setters generation for table gen

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 7 11:03:42 PST 2020


rriddle added inline comments.


================
Comment at: mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp:393
+  FmtContext fctx;
+  fctx.withBuilder("mlir::Builder(this->getContext())");
+  auto emitAttrWithStorageType = [&](StringRef name, Attribute attr) {
----------------
What is the context used for?


================
Comment at: mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp:404
+    const auto &attr = namedAttr.attr;
+    if (! attr.isDerivedAttr()) {
+      emitAttrWithStorageType(name, attr);
----------------
nit: Remove the extra space, and drop the trivial braces.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74143





More information about the llvm-commits mailing list