40 attributes.insert(std::make_pair(tag,
value));
70 attributes.insert(std::make_pair(tag,
value));
80 if (!valueDesc.
empty())
100 if (
Error e = handler(tag, handled))
134 if (vendorName.
lower() != vendor) {
152 "invalid attribute size " +
Twine(
size) +
160 scopeName =
"FileAttributes";
163 scopeName =
"SectionAttributes";
164 indexName =
"Sections";
168 scopeName =
"SymbolAttributes";
169 indexName =
"Symbols";
181 if (!indices.
empty())
193 unsigned sectionNumber = 0;
198 struct ClearCursorError {
207 "unrecognized format-version: 0x" +
208 utohexstr(formatVersion));
216 sw->
startLine() <<
"Section " << ++sectionNumber <<
" {\n";
220 if (sectionLength < 4 ||
cursor.
tell() - 4 + sectionLength > section.
size())
222 "invalid section length " +
223 Twine(sectionLength) +
" at offset 0x" +
static void clear(coro::Shape &Shape)
Given that RA is a live value
static constexpr EnumEntry< unsigned > tagNames[]
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
size_t size() const
size - Get the array size.
void setAttributeString(unsigned tag, StringRef value)
Error parseSubsection(uint32_t length)
Error integerAttribute(unsigned tag)
DataExtractor::Cursor cursor
Error stringAttribute(unsigned tag)
Error parse(ArrayRef< uint8_t > section, llvm::endianness endian)
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)
Error parseAttributeList(uint32_t length)
TagNameMap tagToStringMap
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
virtual void printString(StringRef Value)
void indent(int Levels=1)
void unindent(int Levels=1)
void printEnum(StringRef Label, T Value, ArrayRef< EnumEntry< TEnum > > EnumValues)
virtual raw_ostream & startLine()
virtual void printNumber(StringRef Label, char Value)
void printList(StringRef Label, const ArrayRef< T > List)
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
constexpr bool empty() const
empty - Check if the string is empty.
std::string lower() const
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
static Twine utohexstr(const uint64_t &Val)
StringRef attrTypeAsString(unsigned attr, TagNameMap tagNameMap, bool hasTagPrefix=true)
This is an optimization pass for GlobalISel generic memory operations.
auto size(R &&Range, std::enable_if_t< std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< decltype(Range.begin())>::iterator_category >::value, void > *=nullptr)
Get the size of a range.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
void consumeError(Error Err)
Consume a Error without doing anything.