[mlir] fix a crash if the dialect is missing a data layout interface
authorAlex Zinenko <zinenko@google.com>
Wed, 9 Jun 2021 09:51:04 +0000 (11:51 +0200)
committerAlex Zinenko <zinenko@google.com>
Wed, 9 Jun 2021 15:46:27 +0000 (17:46 +0200)
commitf6faa71eafbcd52d5154aadf888fce8b3af73c16
tree6d8a7c51948177e2b4184361f148aa253085a46d
parentcdb9d242debaf689395bf38d19ca90327cd3b9fa
[mlir] fix a crash if the dialect is missing a data layout interface

The top-level verifier of data layout specifications delegates verification of
entries with identifier keys to the dialect of the identifier prefix. This flow
was missing a check whether the dialect actually implements the relevant
interface.

Reviewed By: gysit

Differential Revision: https://reviews.llvm.org/D103945
mlir/lib/Interfaces/DataLayoutInterfaces.cpp
mlir/test/Interfaces/DataLayoutInterfaces/types.mlir