1 //===-- HexagonAttributeParser.cpp - Hexagon Attribute Parser -------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #include "llvm/Support/HexagonAttributeParser.h"
13 const HexagonAttributeParser::DisplayHandler
14 HexagonAttributeParser::DisplayRoutines
[] = {
17 &ELFAttributeParser::integerAttribute
,
20 HexagonAttrs::HVXARCH
,
21 &ELFAttributeParser::integerAttribute
,
24 HexagonAttrs::HVXIEEEFP
,
25 &ELFAttributeParser::integerAttribute
,
28 HexagonAttrs::HVXQFLOAT
,
29 &ELFAttributeParser::integerAttribute
,
33 &ELFAttributeParser::integerAttribute
,
37 &ELFAttributeParser::integerAttribute
,
41 &ELFAttributeParser::integerAttribute
,
44 Error
HexagonAttributeParser::handler(uint64_t Tag
, bool &Handled
) {
46 for (const auto &R
: DisplayRoutines
) {
47 if (uint64_t(R
.Attribute
) == Tag
) {
48 if (Error E
= (this->*R
.Routine
)(Tag
))
54 return Error::success();