MCCodeEmitter.h revision 4a0abd80f18f9c2a10bf5b14cd6731d51972a426
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
13namespace llvm {
14
15/// MCCodeEmitter - Generic instruction encoding interface.
16class MCCodeEmitter {
17  MCCodeEmitter(const MCCodeEmitter &);   // DO NOT IMPLEMENT
18  void operator=(const MCCodeEmitter &);  // DO NOT IMPLEMENT
19protected: // Can only create subclasses.
20  MCCodeEmitter();
21
22public:
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
33