blob: 571a94778acbc293d512da13a0994fcb78db0b5b [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
Johnny Chen99818142010-04-02 22:41:06 +000020#include "llvm/System/DataTypes.h"
Johnny Chenb68a3ee2010-04-02 22:27:38 +000021
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 }
Duncan Sands34727662010-07-12 08:16:59 +000034
Johnny Chenb68a3ee2010-04-02 22:27:38 +000035 // 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