[all-commits] [llvm/llvm-project] e9db30: [mlir][python] Support more types in IntegerAttr.v...

rk via All-commits all-commits at lists.llvm.org
Thu Feb 24 01:26:45 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e9db306dcd53f33b982d772793ffe7326d40c018
      https://github.com/llvm/llvm-project/commit/e9db306dcd53f33b982d772793ffe7326d40c018
  Author: rkayaith <rkayaith at gmail.com>
  Date:   2022-02-24 (Thu, 24 Feb 2022)

  Changed paths:
    M mlir/include/mlir-c/BuiltinAttributes.h
    M mlir/lib/Bindings/Python/IRAttributes.cpp
    M mlir/lib/CAPI/IR/BuiltinAttributes.cpp
    M mlir/test/CAPI/ir.c
    M mlir/test/python/ir/attributes.py

  Log Message:
  -----------
  [mlir][python] Support more types in IntegerAttr.value

Previously only accessing values for `index` and signless int types
would work; signed and unsigned ints would hit an assert in
`IntegerAttr::getInt`. This exposes `IntegerAttr::get{S,U}Int` to the C
API and calls the appropriate function from the python bindings.

Reviewed By: ftynse

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




More information about the All-commits mailing list