[all-commits] [llvm/llvm-project] d339d8: [mlir][docgen] Display full attribute descriptions...

Benjamin Maxwell via All-commits all-commits at lists.llvm.org
Wed Sep 27 04:22:37 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d339d8fede356f0acfad6d6c1bb960269f2467a9
      https://github.com/llvm/llvm-project/commit/d339d8fede356f0acfad6d6c1bb960269f2467a9
  Author: Benjamin Maxwell <benjamin.maxwell at arm.com>
  Date:   2023-09-27 (Wed, 27 Sep 2023)

  Changed paths:
    M mlir/include/mlir/IR/EnumAttr.td
    M mlir/tools/mlir-tblgen/OpDocGen.cpp

  Log Message:
  -----------
  [mlir][docgen] Display full attribute descriptions in expandable regions (#67009)

This updates the table of op attributes so that clicking the summary
expands to show the complete description.

```
   Attribute | MLIR Type | Description
   <name>      <type>      ▶ <summary>  <-- Click to expand
```

Enum attributes have now also been updated to generate a description
that lists all the cases (with both their MLIR and C++ names). This
makes viewing enums on the MLIR docs much nicer.

**Example**

Default view:

![image](https://github.com/llvm/llvm-project/assets/11597044/922669c7-b838-4230-bcfd-a77cde0f335d)

Expanded:

![image](https://github.com/llvm/llvm-project/assets/11597044/41da086e-a5ce-45dd-9f44-9d10a4d5f2e1)

---

This requires: https://github.com/llvm/mlir-www/pull/158 (adds a very
simple markdown shortcode)




More information about the All-commits mailing list