blob: 33ab30d5c71a3472757f007078910a423c398169 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
#pragma once
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
//===-- MSP430AttributeParser.h - MSP430 Attribute Parser -------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
///
/// \file
/// This file contains support routines for parsing MSP430 ELF build attributes.
///
//===----------------------------------------------------------------------===//
#ifndef LLVM_SUPPORT_MSP430ATTRIBUTEPARSER_H
#define LLVM_SUPPORT_MSP430ATTRIBUTEPARSER_H
#include "llvm/Support/ELFAttributeParser.h"
#include "llvm/Support/MSP430Attributes.h"
namespace llvm {
class MSP430AttributeParser : public ELFAttributeParser {
struct DisplayHandler {
MSP430Attrs::AttrType Attribute;
Error (MSP430AttributeParser::*Routine)(MSP430Attrs::AttrType);
};
static const std::array<DisplayHandler, 4> DisplayRoutines;
Error parseISA(MSP430Attrs::AttrType Tag);
Error parseCodeModel(MSP430Attrs::AttrType Tag);
Error parseDataModel(MSP430Attrs::AttrType Tag);
Error parseEnumSize(MSP430Attrs::AttrType Tag);
Error handler(uint64_t Tag, bool &Handled) override;
public:
MSP430AttributeParser(ScopedPrinter *SW)
: ELFAttributeParser(SW, MSP430Attrs::getMSP430AttributeTags(),
"mspabi") {}
MSP430AttributeParser()
: ELFAttributeParser(MSP430Attrs::getMSP430AttributeTags(), "mspabi") {}
};
} // namespace llvm
#endif
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
|