blob: 66147e2f8cda6f1668976aa65860208e3fc3cfe3 [file] [log] [blame]
Johnny Chenb68a3ee2010-04-02 22:27:38 +00001//===------------ 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 "TableGenBackend.h"
19
20#include "llvm/Support/DataTypes.h"
21
22namespace llvm {
23
24class ARMDecoderEmitter : public TableGenBackend {
25 RecordKeeper &Records;
26public:
27 ARMDecoderEmitter(RecordKeeper &R) : Records(R) {
28 initBackend();
29 }
30
31 ~ARMDecoderEmitter() {
32 shutdownBackend();
33 }
34
35 // run - Output the code emitter
36 void run(raw_ostream &o);
37
38private:
39 // Helper class for ARMDecoderEmitter.
40 class ARMDEBackend;
41
42 ARMDEBackend *Backend;
43
44 void initBackend();
45 void shutdownBackend();
46};
47
48} // end llvm namespace
49
50#endif