1//===-- SystemZAsmPrinter.h - SystemZ LLVM assembly printer ----*- 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_SYSTEMZ_SYSTEMZASMPRINTER_H
11#define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZASMPRINTER_H
12
13#include "SystemZTargetMachine.h"
14#include "llvm/CodeGen/AsmPrinter.h"
15#include "llvm/Support/Compiler.h"
16
17namespace llvm {
18class MCStreamer;
19class MachineBasicBlock;
20class MachineInstr;
21class Module;
22class raw_ostream;
23
24class LLVM_LIBRARY_VISIBILITY SystemZAsmPrinter : public AsmPrinter {
25public:
26  SystemZAsmPrinter(TargetMachine &TM, std::unique_ptr<MCStreamer> Streamer)
27      : AsmPrinter(TM, std::move(Streamer)) {}
28
29  // Override AsmPrinter.
30  const char *getPassName() const override {
31    return "SystemZ Assembly Printer";
32  }
33  void EmitInstruction(const MachineInstr *MI) override;
34  void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) override;
35  bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
36                       unsigned AsmVariant, const char *ExtraCode,
37                       raw_ostream &OS) override;
38  bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
39                             unsigned AsmVariant, const char *ExtraCode,
40                             raw_ostream &OS) override;
41};
42} // end namespace llvm
43
44#endif
45