Summary:
When NamedAttrList::get is called against a StringRef and the
entry is not present, the Identifier::operator== crashes.
Interestingly there seems to be no use of the NamedAttrList::get(StringRef) in
the codebase so far. A subsequent commit will introduce such a use.
Differential Revision: https://reviews.llvm.org/D80089
}
auto *it = llvm::lower_bound(attrs, name);
- if (it->first != name)
+ if (it == attrs.end() || it->first != name)
return attrs.end();
return it;
}