LLVM API Documentation

SystemZAsmPrinter.h
Go to the documentation of this file.
00001 //===-- SystemZAsmPrinter.h - SystemZ LLVM assembly printer ----*- C++ -*--===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 
00010 #ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZASMPRINTER_H
00011 #define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZASMPRINTER_H
00012 
00013 #include "SystemZTargetMachine.h"
00014 #include "llvm/CodeGen/AsmPrinter.h"
00015 #include "llvm/Support/Compiler.h"
00016 
00017 namespace llvm {
00018 class MCStreamer;
00019 class MachineBasicBlock;
00020 class MachineInstr;
00021 class Module;
00022 class raw_ostream;
00023 
00024 class LLVM_LIBRARY_VISIBILITY SystemZAsmPrinter : public AsmPrinter {
00025 private:
00026   const SystemZSubtarget *Subtarget;
00027 
00028 public:
00029   SystemZAsmPrinter(TargetMachine &TM, MCStreamer &Streamer)
00030     : AsmPrinter(TM, Streamer) {
00031     Subtarget = &TM.getSubtarget<SystemZSubtarget>();
00032   }
00033 
00034   // Override AsmPrinter.
00035   const char *getPassName() const override {
00036     return "SystemZ Assembly Printer";
00037   }
00038   void EmitInstruction(const MachineInstr *MI) override;
00039   void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) override;
00040   bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
00041                        unsigned AsmVariant, const char *ExtraCode,
00042                        raw_ostream &OS) override;
00043   bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
00044                              unsigned AsmVariant, const char *ExtraCode,
00045                              raw_ostream &OS) override;
00046   void EmitEndOfAsmFile(Module &M) override;
00047 };
00048 } // end namespace llvm
00049 
00050 #endif