Go to the documentation of this file.
9 #ifndef LLVM_SUPPORT_ELFATTRIBUTEPARSER_H
10 #define LLVM_SUPPORT_ELFATTRIBUTEPARSER_H
19 #include <unordered_map>
27 std::unordered_map<unsigned, unsigned> attributes;
28 std::unordered_map<unsigned, StringRef> attributesStr;
47 attributesStr.emplace(tag, value);
70 auto I = attributesStr.find(tag);
71 if (
I == attributesStr.end())
std::optional< unsigned > getAttributeValue(unsigned tag) const
This is an optimization pass for GlobalISel generic memory operations.
Error parseStringAttribute(const char *name, unsigned tag, ArrayRef< const char * > strings)
void printAttribute(unsigned tag, unsigned value, StringRef valueDesc)
ELFAttributeParser(TagNameMap tagNameMap, StringRef vendor)
Deduce and propagate attributes
ELFAttributeParser(ScopedPrinter *sw, TagNameMap tagNameMap, StringRef vendor)
Error parseAttributeList(uint32_t length)
std::optional< StringRef > getAttributeString(unsigned tag) const
virtual ~ELFAttributeParser()
Error parse(ArrayRef< uint8_t > section, support::endianness endian)
StringRef - Represent a constant reference to a string, i.e.
DataExtractor::Cursor cursor
Error integerAttribute(unsigned tag)
Lightweight error class with error context and mandatory checking.
void setAttributeString(unsigned tag, StringRef value)
Error parseSubsection(uint32_t length)
TagNameMap tagToStringMap
Error stringAttribute(unsigned tag)
void parseIndexList(SmallVectorImpl< uint8_t > &indexList)