• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===------------ ARMDecoderEmitter.h - Decoder Generator -------*- 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 // This file is part of the ARM Disassembler.
11 // It contains the tablegen backend declaration ARMDecoderEmitter.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef ARMDECODEREMITTER_H
16 #define ARMDECODEREMITTER_H
17 
18 #include "llvm/Support/DataTypes.h"
19 #include "llvm/TableGen/TableGenBackend.h"
20 
21 namespace llvm {
22 
23 class ARMDecoderEmitter : public TableGenBackend {
24   RecordKeeper &Records;
25 public:
ARMDecoderEmitter(RecordKeeper & R)26   ARMDecoderEmitter(RecordKeeper &R) : Records(R) {
27     initBackend();
28   }
29 
~ARMDecoderEmitter()30   ~ARMDecoderEmitter() {
31     shutdownBackend();
32   }
33 
34   // run - Output the code emitter
35   void run(raw_ostream &o);
36 
37 private:
38   // Helper class for ARMDecoderEmitter.
39   class ARMDEBackend;
40 
41   ARMDEBackend *Backend;
42 
43   void initBackend();
44   void shutdownBackend();
45 };
46 
47 } // end llvm namespace
48 
49 #endif
50