Add a parseAttribute<AttrType> overload for the non-type case.
authorRiver Riddle <riverriddle@google.com>
Mon, 18 Nov 2019 21:11:00 +0000 (13:11 -0800)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Mon, 18 Nov 2019 21:11:36 +0000 (13:11 -0800)
commit9873a29817840369b32b018272ec2b3b2f0d076f
tree32eef22c86f71c28bbb19311382f36da2348bdbc
parent1f475e316cc9991004fbfb8096bd0b10398515f3
Add a parseAttribute<AttrType> overload for the non-type case.

The variant that accepts a type will check that the parsed attribute is a valid instance of AttrType. The non-type variant would silently fail in this case, leading to garbage attribute values.

PiperOrigin-RevId: 281136528
mlir/include/mlir/IR/DialectImplementation.h
mlir/include/mlir/IR/OpImplementation.h
mlir/test/Dialect/SPIRV/structure-ops.mlir