Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:32

0001 //===-- MSP430AttributeParser.h - MSP430 Attribute Parser -------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 ///
0009 /// \file
0010 /// This file contains support routines for parsing MSP430 ELF build attributes.
0011 ///
0012 //===----------------------------------------------------------------------===//
0013 
0014 #ifndef LLVM_SUPPORT_MSP430ATTRIBUTEPARSER_H
0015 #define LLVM_SUPPORT_MSP430ATTRIBUTEPARSER_H
0016 
0017 #include "llvm/Support/ELFAttributeParser.h"
0018 #include "llvm/Support/MSP430Attributes.h"
0019 
0020 namespace llvm {
0021 class MSP430AttributeParser : public ELFAttributeParser {
0022   struct DisplayHandler {
0023     MSP430Attrs::AttrType Attribute;
0024     Error (MSP430AttributeParser::*Routine)(MSP430Attrs::AttrType);
0025   };
0026   static const std::array<DisplayHandler, 4> DisplayRoutines;
0027 
0028   Error parseISA(MSP430Attrs::AttrType Tag);
0029   Error parseCodeModel(MSP430Attrs::AttrType Tag);
0030   Error parseDataModel(MSP430Attrs::AttrType Tag);
0031   Error parseEnumSize(MSP430Attrs::AttrType Tag);
0032 
0033   Error handler(uint64_t Tag, bool &Handled) override;
0034 
0035 public:
0036   MSP430AttributeParser(ScopedPrinter *SW)
0037       : ELFAttributeParser(SW, MSP430Attrs::getMSP430AttributeTags(),
0038                            "mspabi") {}
0039   MSP430AttributeParser()
0040       : ELFAttributeParser(MSP430Attrs::getMSP430AttributeTags(), "mspabi") {}
0041 };
0042 } // namespace llvm
0043 
0044 #endif