Update ElementsAttr::isValidIndex to handle ElementsAttr with a scalar. Scalar will...
authorkarimnosseir <karimnosseir@google.com>
Sat, 30 Jan 2021 00:55:12 +0000 (16:55 -0800)
committerJacques Pienaar <jpienaar@google.com>
Sat, 30 Jan 2021 00:56:00 +0000 (16:56 -0800)
commit0af25275364e27d9766eb0912a5dd9731d62936b
tree2ceee9f075f57bc803235fc7fe5586a731b6aa62
parent9847023660467a4469b5667bcf7a4c73a4780037
Update ElementsAttr::isValidIndex to handle ElementsAttr with a scalar. Scalar will have rank 0.

Update ElementsAttr::isValidIndex to handle ElementsAttr with a scalar. Scalar will have rank 0.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D95663
mlir/lib/IR/BuiltinAttributes.cpp
mlir/unittests/IR/AttributeTest.cpp