17 tagNameMap, [attr](
const TagNameItem item) {
return item.
attr == attr; });
18 if (tagNameIt == tagNameMap.
end())
21 return hasTagPrefix ? tagName : tagName.
drop_front(4);
31 if (tagNameIt == tagNameMap.
end())
33 return tagNameIt->attr;
StringRef - Represent a constant reference to a string, i.e.
bool starts_with(StringRef Prefix) const
Check if this string starts with the given Prefix.
StringRef drop_front(size_t N=1) const
Return a StringRef equal to 'this' but with the first N elements dropped.
std::optional< unsigned > attrTypeFromString(StringRef tag, TagNameMap tagNameMap)
StringRef attrTypeAsString(unsigned attr, TagNameMap tagNameMap, bool hasTagPrefix=true)
This is an optimization pass for GlobalISel generic memory operations.
auto find_if(R &&Range, UnaryPredicate P)
Provide wrappers to std::find_if which take ranges instead of having to pass begin/end explicitly.