LLVM  12.0.0git
RISCVTargetStreamer.h
Go to the documentation of this file.
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"
14 
15 namespace llvm {
16 
18 public:
20  void finish() override;
21 
22  virtual void emitDirectiveOptionPush();
23  virtual void emitDirectiveOptionPop();
24  virtual void emitDirectiveOptionPIC();
25  virtual void emitDirectiveOptionNoPIC();
26  virtual void emitDirectiveOptionRVC();
27  virtual void emitDirectiveOptionNoRVC();
28  virtual void emitDirectiveOptionRelax();
29  virtual void emitDirectiveOptionNoRelax();
30  virtual void emitAttribute(unsigned Attribute, unsigned Value);
31  virtual void finishAttributeSection();
32  virtual void emitTextAttribute(unsigned Attribute, StringRef String);
33  virtual void emitIntTextAttribute(unsigned Attribute, unsigned IntValue,
34  StringRef StringValue);
35 
36  void emitTargetAttributes(const MCSubtargetInfo &STI);
37 };
38 
39 // This part is for ascii assembly output
42 
43  void finishAttributeSection() override;
44  void emitAttribute(unsigned Attribute, unsigned Value) override;
45  void emitTextAttribute(unsigned Attribute, StringRef String) override;
46  void emitIntTextAttribute(unsigned Attribute, unsigned IntValue,
47  StringRef StringValue) override;
48 
49 public:
51 
52  void emitDirectiveOptionPush() override;
53  void emitDirectiveOptionPop() override;
54  void emitDirectiveOptionPIC() override;
55  void emitDirectiveOptionNoPIC() override;
56  void emitDirectiveOptionRVC() override;
57  void emitDirectiveOptionNoRVC() override;
58  void emitDirectiveOptionRelax() override;
59  void emitDirectiveOptionNoRelax() override;
60 };
61 
62 }
63 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:23
formatted_raw_ostream - A raw_ostream that wraps another one and keeps track of line and column posit...
Target specific streamer interface.
Definition: MCStreamer.h:92
virtual void emitTextAttribute(unsigned Attribute, StringRef String)
virtual void emitIntTextAttribute(unsigned Attribute, unsigned IntValue, StringRef StringValue)
RISCVTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS)
Streaming machine code generation interface.
Definition: MCStreamer.h:198
void emitTargetAttributes(const MCSubtargetInfo &STI)
virtual void emitAttribute(unsigned Attribute, unsigned Value)
virtual void emitDirectiveOptionNoRelax()
Generic base class for all target subtargets.
LLVM Value Representation.
Definition: Value.h:75
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:57