1 //===- HexagonMCELFStreamer.h - Hexagon subclass of MCElfStreamer ---------===//
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-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIB_TARGET_HEXAGON_MCTARGETDESC_HEXAGONMCELFSTREAMER_H
10 #define LLVM_LIB_TARGET_HEXAGON_MCTARGETDESC_HEXAGONMCELFSTREAMER_H
12 #include "MCTargetDesc/HexagonMCTargetDesc.h"
13 #include "llvm/MC/MCELFStreamer.h"
14 #include "llvm/MC/MCInstrInfo.h"
20 class HexagonMCELFStreamer
: public MCELFStreamer
{
21 std::unique_ptr
<MCInstrInfo
> MCII
;
24 HexagonMCELFStreamer(MCContext
&Context
, std::unique_ptr
<MCAsmBackend
> TAB
,
25 std::unique_ptr
<MCObjectWriter
> OW
,
26 std::unique_ptr
<MCCodeEmitter
> Emitter
);
28 HexagonMCELFStreamer(MCContext
&Context
, std::unique_ptr
<MCAsmBackend
> TAB
,
29 std::unique_ptr
<MCObjectWriter
> OW
,
30 std::unique_ptr
<MCCodeEmitter
> Emitter
,
31 MCAssembler
*Assembler
);
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 unsigned ByteAlignment
,
38 void HexagonMCEmitCommonSymbol(MCSymbol
*Symbol
, uint64_t Size
,
39 unsigned ByteAlignment
, unsigned AccessSize
);
42 MCStreamer
*createHexagonELFStreamer(Triple
const &TT
, MCContext
&Context
,
43 std::unique_ptr
<MCAsmBackend
> MAB
,
44 std::unique_ptr
<MCObjectWriter
> OW
,
45 std::unique_ptr
<MCCodeEmitter
> CE
);
47 } // end namespace llvm
49 #endif // LLVM_LIB_TARGET_HEXAGON_MCTARGETDESC_HEXAGONMCELFSTREAMER_H