9#ifndef LLVM_SUPPORT_ELFATTRIBUTEPARSER_H
10#define LLVM_SUPPORT_ELFATTRIBUTEPARSER_H
18#include <unordered_map>
26 std::unordered_map<unsigned, unsigned> attributes;
27 std::unordered_map<unsigned, StringRef> attributesStr;
46 attributesStr.emplace(tag,
value);
63 auto I = attributes.find(tag);
64 if (
I == attributes.end())
69 auto I = attributesStr.find(tag);
70 if (
I == attributesStr.end())
Given that RA is a live value
void setAttributeString(unsigned tag, StringRef value)
Error parseSubsection(uint32_t length)
std::optional< StringRef > getAttributeString(unsigned tag) const
std::optional< unsigned > getAttributeValue(unsigned tag) const
Error integerAttribute(unsigned tag)
DataExtractor::Cursor cursor
ELFAttributeParser(ScopedPrinter *sw, TagNameMap tagNameMap, StringRef vendor)
ELFAttributeParser(TagNameMap tagNameMap, StringRef vendor)
Error stringAttribute(unsigned tag)
void parseIndexList(SmallVectorImpl< uint8_t > &indexList)
Error parseStringAttribute(const char *name, unsigned tag, ArrayRef< const char * > strings)
void printAttribute(unsigned tag, unsigned value, StringRef valueDesc)
virtual ~ELFAttributeParser()
Error parseAttributeList(uint32_t length)
TagNameMap tagToStringMap
Lightweight error class with error context and mandatory checking.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
StringRef - Represent a constant reference to a string, i.e.
This is an optimization pass for GlobalISel generic memory operations.