1 //===-- RISCVTargetStreamer.h - RISCV Target Streamer ----------*- C++ -*--===//
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_RISCV_RISCVTARGETSTREAMER_H
10 #define LLVM_LIB_TARGET_RISCV_RISCVTARGETSTREAMER_H
12 #include "llvm/MC/MCStreamer.h"
16 class RISCVTargetStreamer
: public MCTargetStreamer
{
18 RISCVTargetStreamer(MCStreamer
&S
);
20 virtual void emitDirectiveOptionPush() = 0;
21 virtual void emitDirectiveOptionPop() = 0;
22 virtual void emitDirectiveOptionRVC() = 0;
23 virtual void emitDirectiveOptionNoRVC() = 0;
24 virtual void emitDirectiveOptionRelax() = 0;
25 virtual void emitDirectiveOptionNoRelax() = 0;
28 // This part is for ascii assembly output
29 class RISCVTargetAsmStreamer
: public RISCVTargetStreamer
{
30 formatted_raw_ostream
&OS
;
33 RISCVTargetAsmStreamer(MCStreamer
&S
, formatted_raw_ostream
&OS
);
35 void emitDirectiveOptionPush() override
;
36 void emitDirectiveOptionPop() override
;
37 void emitDirectiveOptionRVC() override
;
38 void emitDirectiveOptionNoRVC() override
;
39 void emitDirectiveOptionRelax() override
;
40 void emitDirectiveOptionNoRelax() override
;