Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //===-- RISCVAttributeParser.h - RISCV 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 #ifndef LLVM_SUPPORT_RISCVATTRIBUTEPARSER_H
0010 #define LLVM_SUPPORT_RISCVATTRIBUTEPARSER_H
0011 
0012 #include "llvm/Support/ELFAttributeParser.h"
0013 #include "llvm/Support/RISCVAttributes.h"
0014 
0015 namespace llvm {
0016 class RISCVAttributeParser : public ELFAttributeParser {
0017   struct DisplayHandler {
0018     RISCVAttrs::AttrType attribute;
0019     Error (RISCVAttributeParser::*routine)(unsigned);
0020   };
0021   static const DisplayHandler displayRoutines[];
0022 
0023   Error handler(uint64_t tag, bool &handled) override;
0024 
0025   Error unalignedAccess(unsigned tag);
0026   Error stackAlign(unsigned tag);
0027   Error atomicAbi(unsigned tag);
0028 
0029 public:
0030   RISCVAttributeParser(ScopedPrinter *sw)
0031       : ELFAttributeParser(sw, RISCVAttrs::getRISCVAttributeTags(), "riscv") {}
0032   RISCVAttributeParser()
0033       : ELFAttributeParser(RISCVAttrs::getRISCVAttributeTags(), "riscv") {}
0034 };
0035 
0036 } // namespace llvm
0037 
0038 #endif