[MLIR][Standard] Fix use of `dyn_cast_or_null`
authorFrederik Gossen <frgossen@google.com>
Tue, 16 Jun 2020 21:04:57 +0000 (21:04 +0000)
committerFrederik Gossen <frgossen@google.com>
Tue, 16 Jun 2020 21:06:15 +0000 (21:06 +0000)
commit6f2943fb1960a698b8fb876fdcc10f4508fd45f6
tree80efe91d6fc5172a911c91fbc5e467cb090c081a
parent6a5641eff6cd2069e7d64cdb8507bad60cb2894a
[MLIR][Standard] Fix use of `dyn_cast_or_null`

The value may be a function argument in which case `getDefiningOp` will return a
`nullptr`.

Differential Revision: https://reviews.llvm.org/D81965
mlir/lib/Dialect/StandardOps/IR/Ops.cpp