[all-commits] [llvm/llvm-project] 41eb2c: [MLIR] Mark additional builtin attr methods const

Fabian Schuiki via All-commits all-commits at lists.llvm.org
Tue Jun 8 05:45:42 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 41eb2cec47986d8128c0ef03164a007b0db67127
      https://github.com/llvm/llvm-project/commit/41eb2cec47986d8128c0ef03164a007b0db67127
  Author: Fabian Schuiki <fabian at schuiki.ch>
  Date:   2021-06-08 (Tue, 08 Jun 2021)

  Changed paths:
    M mlir/include/mlir/IR/BuiltinAttributes.td

  Log Message:
  -----------
  [MLIR] Mark additional builtin attr methods const

* Mark the following methods const:
  * `ArrayAttr::getAsRange`
  * `ArrayAttr::getAsValueRange`
  * `DictionaryAttr::getAs`
* Make `DictionarAttr::getAs` generic over the name class, such that
  `Identifier` and `StringRef` arguments get forwarded to the underlying
  call to `get`. (Made generic to avoid introducing a dependency on
  `include/mlir/IR/Identifier.h` as per the diff discussion.)

Reviewed By: rriddle

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




More information about the All-commits mailing list