fdacb942827bd128d3b5cac7881ba2ac97609736
[oota-llvm.git] / include / llvm / MC / MCCodeEmitter.h
1 //===-- llvm/MC/MCCodeEmitter.h - Instruction Encoding ----------*- 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_MC_MCCODEEMITTER_H
11 #define LLVM_MC_MCCODEEMITTER_H
12
13 namespace llvm {
14
15 /// MCCodeEmitter - Generic instruction encoding interface.
16 class MCCodeEmitter {
17   MCCodeEmitter(const MCCodeEmitter &);   // DO NOT IMPLEMENT
18   void operator=(const MCCodeEmitter &);  // DO NOT IMPLEMENT
19 protected: // Can only create subclasses.
20   MCCodeEmitter();
21  
22 public:
23   virtual ~MCCodeEmitter();
24
25   /// EncodeInstruction - Encode the given \arg Inst to bytes on the output
26   /// stream \arg OS.
27   virtual void EncodeInstruction(const MCInst &Inst, raw_ostream &OS) = 0;
28 };
29
30 } // End llvm namespace
31
32 #endif