]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.h
Merge r357348 from the clang 10.0.0 import branch:
[FreeBSD/FreeBSD.git] / contrib / llvm-project / llvm / lib / Target / RISCV / MCTargetDesc / RISCVTargetStreamer.h
1 //===-- RISCVTargetStreamer.h - RISCV Target Streamer ----------*- C++ -*--===//
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-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_LIB_TARGET_RISCV_RISCVTARGETSTREAMER_H
10 #define LLVM_LIB_TARGET_RISCV_RISCVTARGETSTREAMER_H
11
12 #include "llvm/MC/MCStreamer.h"
13
14 namespace llvm {
15
16 class RISCVTargetStreamer : public MCTargetStreamer {
17 public:
18   RISCVTargetStreamer(MCStreamer &S);
19
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;
26 };
27
28 // This part is for ascii assembly output
29 class RISCVTargetAsmStreamer : public RISCVTargetStreamer {
30   formatted_raw_ostream &OS;
31
32 public:
33   RISCVTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS);
34
35   void emitDirectiveOptionPush() override;
36   void emitDirectiveOptionPop() override;
37   void emitDirectiveOptionRVC() override;
38   void emitDirectiveOptionNoRVC() override;
39   void emitDirectiveOptionRelax() override;
40   void emitDirectiveOptionNoRelax() override;
41 };
42
43 }
44 #endif