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 "TableGenBackend.h" 19 20 #include "llvm/Support/DataTypes.h" 21 22 namespace llvm { 23 24 class ARMDecoderEmitter : public TableGenBackend { 25 RecordKeeper &Records; 26 public: ARMDecoderEmitter(RecordKeeper & R)27 ARMDecoderEmitter(RecordKeeper &R) : Records(R) { 28 initBackend(); 29 } 30 ~ARMDecoderEmitter()31 ~ARMDecoderEmitter() { 32 shutdownBackend(); 33 } 34 35 // run - Output the code emitter 36 void run(raw_ostream &o); 37 38 private: 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 51