d62a9dae7c540e838af0a7d980f830700d5ca9b4
[oota-llvm.git] / include / llvm / MC / MCInstPrinter.h
1 //===-- MCInstPrinter.h - Convert an MCInst to target assembly syntax -----===//
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_MC_MCINSTPRINTER_H
11 #define LLVM_MC_MCINSTPRINTER_H
12
13 namespace llvm {
14 class MCInst;
15 class raw_ostream;
16 class MCAsmInfo;
17
18   
19 /// MCInstPrinter - This is an instance of a target assembly language printer
20 /// that converts an MCInst to valid target assembly syntax.
21 class MCInstPrinter {
22 protected:
23   raw_ostream &O;
24   const MCAsmInfo &MAI;
25 public:
26   MCInstPrinter(raw_ostream &o, const MCAsmInfo &mai) : O(o), MAI(mai) {}
27   
28   virtual ~MCInstPrinter();
29   
30   /// printInst - Print the specified MCInst to the current raw_ostream.
31   ///
32   virtual void printInst(const MCInst *MI) = 0;
33 };
34   
35 } // namespace llvm
36
37 #endif