9#ifndef LLVM_SUPPORT_ELFCOMPACTATTRPARSER_H
10#define LLVM_SUPPORT_ELFCOMPACTATTRPARSER_H
39 void printAttribute(
unsigned tag,
unsigned value,
StringRef valueDesc);
41 Error parseStringAttribute(
const char *
name,
unsigned tag,
48 attributesStr.try_emplace(tag, value);
53 Error integerAttribute(
unsigned tag);
54 Error stringAttribute(
unsigned tag);
65 auto I = attributes.find(tag);
66 if (
I == attributes.end())
70 std::optional<uint64_t>
72 unsigned tag)
const override {
73 assert(
"" == buildAttributeSubsectionName &&
74 "buildAttributeSubsectionName must be an empty string");
78 auto I = attributesStr.find(tag);
79 if (
I == attributesStr.end())
83 std::optional<StringRef>
85 unsigned tag)
const override {
86 assert(
"" == buildAttributeSubsectionName &&
87 "buildAttributeSubsectionName must be an empty string");
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file defines the DenseMap class.
static llvm::Error parse(GsymDataExtractor &Data, uint64_t BaseAddr, LineEntryCallback const &Callback)
Represent a constant reference to an array (0 or more elements consecutively in memory),...
~ELFCompactAttrParser() override
std::optional< StringRef > getAttributeString(unsigned tag) const override
ELFCompactAttrParser(ScopedPrinter *sw, TagNameMap tagNameMap, StringRef vendor)
ELFCompactAttrParser(TagNameMap tagNameMap, StringRef vendor)
void setAttributeString(unsigned tag, StringRef value)
std::optional< StringRef > getAttributeString(StringRef buildAttributeSubsectionName, unsigned tag) const override
TagNameMap tagToStringMap
DataExtractor::Cursor cursor
std::optional< uint64_t > getAttributeValue(StringRef buildAttributeSubsectionName, unsigned tag) const override
std::optional< uint64_t > getAttributeValue(unsigned tag) const override
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...
Represent a constant reference to a string, i.e.
This is an optimization pass for GlobalISel generic memory operations.
ArrayRef< TagNameItem > TagNameMap