1 //===- HexagonMCELFStreamer.h - Hexagon subclass of MCElfStreamer ---------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef LLVM_LIB_TARGET_HEXAGON_MCTARGETDESC_HEXAGONMCELFSTREAMER_H 11 #define LLVM_LIB_TARGET_HEXAGON_MCTARGETDESC_HEXAGONMCELFSTREAMER_H 12 13 #include "MCTargetDesc/HexagonMCTargetDesc.h" 14 #include "llvm/MC/MCELFStreamer.h" 15 #include "llvm/MC/MCInstrInfo.h" 16 #include <cstdint> 17 #include <memory> 18 19 namespace llvm { 20 21 class HexagonMCELFStreamer : public MCELFStreamer { 22 std::unique_ptr<MCInstrInfo> MCII; 23 24 public: 25 HexagonMCELFStreamer(MCContext &Context, std::unique_ptr<MCAsmBackend> TAB, 26 std::unique_ptr<MCObjectWriter> OW, 27 std::unique_ptr<MCCodeEmitter> Emitter); 28 29 HexagonMCELFStreamer(MCContext &Context, std::unique_ptr<MCAsmBackend> TAB, 30 std::unique_ptr<MCObjectWriter> OW, 31 std::unique_ptr<MCCodeEmitter> Emitter, 32 MCAssembler *Assembler); 33 34 void EmitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI, 35 bool) override; 36 void EmitSymbol(const MCInst &Inst); 37 void HexagonMCEmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size, 38 unsigned ByteAlignment, 39 unsigned AccessSize); 40 void HexagonMCEmitCommonSymbol(MCSymbol *Symbol, uint64_t Size, 41 unsigned ByteAlignment, unsigned AccessSize); 42 }; 43 44 MCStreamer *createHexagonELFStreamer(Triple const &TT, MCContext &Context, 45 std::unique_ptr<MCAsmBackend> MAB, 46 std::unique_ptr<MCObjectWriter> OW, 47 std::unique_ptr<MCCodeEmitter> CE); 48 49 } // end namespace llvm 50 51 #endif // LLVM_LIB_TARGET_HEXAGON_MCTARGETDESC_HEXAGONMCELFSTREAMER_H 52