14const RISCVAttributeParser::DisplayHandler
15 RISCVAttributeParser::displayRoutines[] = {
34 &RISCVAttributeParser::stackAlign,
38 &RISCVAttributeParser::unalignedAccess,
42 &RISCVAttributeParser::atomicAbi,
46Error RISCVAttributeParser::atomicAbi(
unsigned Tag) {
52Error RISCVAttributeParser::unalignedAccess(
unsigned tag) {
53 static const char *
const strings[] = {
"No unaligned access",
58Error RISCVAttributeParser::stackAlign(
unsigned tag) {
59 uint64_t value =
de.getULEB128(
cursor);
60 std::string description =
61 "Stack alignment is " +
utostr(value) + std::string(
"-bytes");
66Error RISCVAttributeParser::handler(uint64_t tag,
bool &handled) {
68 for (
const auto &AH : displayRoutines) {
69 if (uint64_t(AH.attribute) == tag) {
70 if (
Error e = (this->*AH.routine)(tag))
Error integerAttribute(unsigned tag)
Error stringAttribute(unsigned tag)
void printAttribute(unsigned tag, unsigned value, StringRef valueDesc)
DataExtractor::Cursor cursor
Error parseStringAttribute(const char *name, unsigned tag, ArrayRef< const char * > strings)
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
This is an optimization pass for GlobalISel generic memory operations.
FunctionAddr VTableAddr Value
std::string utostr(uint64_t X, bool isNeg=false)
ArrayRef(const T &OneElt) -> ArrayRef< T >