1 | //===-- HexagonAttributeParser.h - Hexagon Attribute Parser -----*- C++ -*-===// |
---|---|
2 | // |
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 |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #ifndef LLVM_SUPPORT_HEXAGONATTRIBUTEPARSER_H |
10 | #define LLVM_SUPPORT_HEXAGONATTRIBUTEPARSER_H |
11 | |
12 | #include "llvm/Support/ELFAttributeParser.h" |
13 | #include "llvm/Support/HexagonAttributes.h" |
14 | |
15 | namespace llvm { |
16 | class HexagonAttributeParser : public ELFAttributeParser { |
17 | struct DisplayHandler { |
18 | HexagonAttrs::AttrType Attribute; |
19 | Error (HexagonAttributeParser::*Routine)(unsigned); |
20 | }; |
21 | |
22 | static const DisplayHandler DisplayRoutines[]; |
23 | |
24 | Error handler(uint64_t Tag, bool &Handled) override; |
25 | |
26 | public: |
27 | HexagonAttributeParser(ScopedPrinter *SP) |
28 | : ELFAttributeParser(SP, HexagonAttrs::getHexagonAttributeTags(), |
29 | "hexagon") {} |
30 | HexagonAttributeParser() |
31 | : ELFAttributeParser(HexagonAttrs::getHexagonAttributeTags(), "hexagon") { |
32 | } |
33 | }; |
34 | |
35 | } // namespace llvm |
36 | |
37 | #endif |
38 |