[all-commits] [llvm/llvm-project] d78136: [mlir] Add AnyAttrOf tablegen attribute constraint

Fehr Mathieu via All-commits all-commits at lists.llvm.org
Mon Oct 18 08:45:47 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d78136121eb1ddbc416648f9f08be2e87709b06a
      https://github.com/llvm/llvm-project/commit/d78136121eb1ddbc416648f9f08be2e87709b06a
  Author: Mathieu Fehr <mathieu.fehr at gmail.com>
  Date:   2021-10-18 (Mon, 18 Oct 2021)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/test/IR/attribute.mlir
    M mlir/test/lib/Dialect/Test/TestOps.td

  Log Message:
  -----------
  [mlir] Add AnyAttrOf tablegen attribute constraint

AnyAttrOf, similar to AnyTypeOf, expects the attribute to be one of the
given attributes.
For instance, `AnyAttrOf<[I32Attr, StrAttr]>` expects either a `I32Attr`,
or a `StrAttr`.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D111739




More information about the All-commits mailing list