LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MCCodeEmitter.h
Go to the documentation of this file.
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 #include "llvm/Support/Compiler.h"
14 
15 namespace llvm {
16 class MCFixup;
17 class MCInst;
18 class raw_ostream;
19 template<typename T> class SmallVectorImpl;
20 
21 /// MCCodeEmitter - Generic instruction encoding interface.
23 private:
25  void operator=(const MCCodeEmitter &) LLVM_DELETED_FUNCTION;
26 protected: // Can only create subclasses.
27  MCCodeEmitter();
28 
29 public:
30  virtual ~MCCodeEmitter();
31 
32  /// Lifetime management
33  virtual void reset() { }
34 
35  /// EncodeInstruction - Encode the given \p Inst to bytes on the output
36  /// stream \p OS.
37  virtual void EncodeInstruction(const MCInst &Inst, raw_ostream &OS,
38  SmallVectorImpl<MCFixup> &Fixups) const = 0;
39 };
40 
41 } // End llvm namespace
42 
43 #endif
virtual void EncodeInstruction(const MCInst &Inst, raw_ostream &OS, SmallVectorImpl< MCFixup > &Fixups) const =0
virtual void reset()
Lifetime management.
Definition: MCCodeEmitter.h:33
MCCodeEmitter - Generic instruction encoding interface.
Definition: MCCodeEmitter.h:22
#define LLVM_DELETED_FUNCTION
Definition: Compiler.h:137