1//===-- SparcTargetStreamer.h - Sparc 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 SPARCTARGETSTREAMER_H
11#define SPARCTARGETSTREAMER_H
12
13#include "llvm/MC/MCELFStreamer.h"
14#include "llvm/MC/MCStreamer.h"
15
16namespace llvm {
17class SparcTargetStreamer : public MCTargetStreamer {
18  virtual void anchor();
19
20public:
21  SparcTargetStreamer(MCStreamer &S);
22  /// Emit ".register <reg>, #ignore".
23  virtual void emitSparcRegisterIgnore(unsigned reg) = 0;
24  /// Emit ".register <reg>, #scratch".
25  virtual void emitSparcRegisterScratch(unsigned reg) = 0;
26};
27
28// This part is for ascii assembly output
29class SparcTargetAsmStreamer : public SparcTargetStreamer {
30  formatted_raw_ostream &OS;
31
32public:
33  SparcTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS);
34  void emitSparcRegisterIgnore(unsigned reg) override;
35  void emitSparcRegisterScratch(unsigned reg) override;
36
37};
38
39// This part is for ELF object output
40class SparcTargetELFStreamer : public SparcTargetStreamer {
41public:
42  SparcTargetELFStreamer(MCStreamer &S);
43  MCELFStreamer &getStreamer();
44  void emitSparcRegisterIgnore(unsigned reg) override {}
45  void emitSparcRegisterScratch(unsigned reg) override {}
46};
47} // end namespace llvm
48
49#endif
50