Emit cast instead of dyn_cast_or_null where attribute is required.
authorJacques Pienaar <jpienaar@google.com>
Fri, 10 May 2019 15:51:34 +0000 (08:51 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Sat, 11 May 2019 02:28:29 +0000 (19:28 -0700)
commitfa97d3a2cfd590f3279cb44735e68c2aa10e0bee
treebdde2331f843d61a5031295add4e6430dd0464ac
parent6bdd13f1072329cc2c6835d7a0c0cce4bee0b306
Emit cast instead of dyn_cast_or_null where attribute is required.

    If the attribute needs to exist for the validity of the op, then no need to use
    dyn_cast_or_null as the op would be invalid in the cases where cast fails, so
    just use cast.

--

PiperOrigin-RevId: 247617696
mlir/test/mlir-tblgen/attr-enum.td
mlir/test/mlir-tblgen/op-attribute.td
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp