[mlir] Add assertion in NamedAttrList to prevent adding null attributes

Differential Revision: https://reviews.llvm.org/D108570
This commit is contained in:
Tres Popp 2021-08-23 19:24:12 +02:00
parent b0b26ae4b3
commit 868bd9938d
1 changed files with 1 additions and 0 deletions

View File

@ -72,6 +72,7 @@ void NamedAttrList::assign(const_iterator in_start, const_iterator in_end) {
}
void NamedAttrList::push_back(NamedAttribute newAttribute) {
assert(newAttribute.second && "unexpected null attribute");
if (isSorted())
dictionarySorted.setInt(
attrs.empty() ||