1 //===-- RISCVTargetStreamer.h - RISCV Target Streamer ----------*- C++ -*--===// 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_RISCV_RISCVTARGETSTREAMER_H 11 #define LLVM_LIB_TARGET_RISCV_RISCVTARGETSTREAMER_H 12 13 #include "llvm/MC/MCStreamer.h" 14 15 namespace llvm { 16 17 class RISCVTargetStreamer : public MCTargetStreamer { 18 public: 19 RISCVTargetStreamer(MCStreamer &S); 20 21 virtual void emitDirectiveOptionPush() = 0; 22 virtual void emitDirectiveOptionPop() = 0; 23 virtual void emitDirectiveOptionRVC() = 0; 24 virtual void emitDirectiveOptionNoRVC() = 0; 25 virtual void emitDirectiveOptionRelax() = 0; 26 virtual void emitDirectiveOptionNoRelax() = 0; 27 }; 28 29 // This part is for ascii assembly output 30 class RISCVTargetAsmStreamer : public RISCVTargetStreamer { 31 formatted_raw_ostream &OS; 32 33 public: 34 RISCVTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS); 35 36 void emitDirectiveOptionPush() override; 37 void emitDirectiveOptionPop() override; 38 void emitDirectiveOptionRVC() override; 39 void emitDirectiveOptionNoRVC() override; 40 void emitDirectiveOptionRelax() override; 41 void emitDirectiveOptionNoRelax() override; 42 }; 43 44 } 45 #endif 46