[mlir] Add Float Attribute, Integer Attribute and Bool Attribute subclasses to python...
authorzhanghb97 <zhanghb97@126.com>
Wed, 30 Sep 2020 06:11:46 +0000 (14:11 +0800)
committerzhanghb97 <zhanghb97@126.com>
Fri, 2 Oct 2020 16:32:51 +0000 (00:32 +0800)
commit2fc0d4a8e83807d57f8d586af82934f94dead5e3
treebec061f33f020b0d89aecdaf2b37af9907e3366f
parent34d12c15f7d8336c74bd4493e8d284dc169587b9
[mlir] Add Float Attribute, Integer Attribute and Bool Attribute subclasses to python bindings.

Based on PyAttribute and PyConcreteAttribute classes, this patch implements the bindings of Float Attribute, Integer Attribute and Bool Attribute subclasses.
This patch also defines the `mlirFloatAttrDoubleGetChecked` C API which is bound with the `FloatAttr.get_typed` python method.

Differential Revision: https://reviews.llvm.org/D88531
mlir/include/mlir-c/StandardAttributes.h
mlir/lib/Bindings/Python/IRModules.cpp
mlir/lib/CAPI/IR/StandardAttributes.cpp
mlir/test/Bindings/Python/ir_attributes.py