brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · ba25a0e Raw
49 lines · c
1//===- HexagonMCELFStreamer.h - Hexagon subclass of MCElfStreamer ---------===//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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLVM_LIB_TARGET_HEXAGON_MCTARGETDESC_HEXAGONMCELFSTREAMER_H10#define LLVM_LIB_TARGET_HEXAGON_MCTARGETDESC_HEXAGONMCELFSTREAMER_H11 12#include "MCTargetDesc/HexagonMCTargetDesc.h"13#include "llvm/MC/MCELFStreamer.h"14#include "llvm/MC/MCInstrInfo.h"15#include <cstdint>16#include <memory>17 18namespace llvm {19 20class HexagonMCELFStreamer : public MCELFStreamer {21  std::unique_ptr<MCInstrInfo> MCII;22 23public:24  HexagonMCELFStreamer(MCContext &Context, std::unique_ptr<MCAsmBackend> TAB,25                       std::unique_ptr<MCObjectWriter> OW,26                       std::unique_ptr<MCCodeEmitter> Emitter);27 28  HexagonMCELFStreamer(MCContext &Context, std::unique_ptr<MCAsmBackend> TAB,29                       std::unique_ptr<MCObjectWriter> OW,30                       std::unique_ptr<MCCodeEmitter> Emitter,31                       MCAssembler *Assembler);32 33  void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI) override;34  void EmitSymbol(const MCInst &Inst);35  void HexagonMCEmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size,36                                      Align ByteAlignment, unsigned AccessSize);37  void HexagonMCEmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,38                                 Align ByteAlignment, unsigned AccessSize);39};40 41MCStreamer *createHexagonELFStreamer(Triple const &TT, MCContext &Context,42                                     std::unique_ptr<MCAsmBackend> MAB,43                                     std::unique_ptr<MCObjectWriter> OW,44                                     std::unique_ptr<MCCodeEmitter> CE);45 46} // end namespace llvm47 48#endif // LLVM_LIB_TARGET_HEXAGON_MCTARGETDESC_HEXAGONMCELFSTREAMER_H49