Misha Brukman | 9fff7e1 | 2003-05-24 00:15:53 +0000 | [diff] [blame] | 1 | //===- CodeEmitterGen.h - Code Emitter Generator ----------------*- C++ -*-===// |
John Criswell | 01d4582 | 2003-10-20 20:20:30 +0000 | [diff] [blame] | 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file was developed by the LLVM research group and is distributed under |
| 6 | // the University of Illinois Open Source License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
Misha Brukman | 9fff7e1 | 2003-05-24 00:15:53 +0000 | [diff] [blame] | 9 | // |
Chris Lattner | aaa3939 | 2003-07-31 04:32:37 +0000 | [diff] [blame] | 10 | // FIXME: document |
Misha Brukman | 9fff7e1 | 2003-05-24 00:15:53 +0000 | [diff] [blame] | 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef CODEMITTERGEN_H |
| 15 | #define CODEMITTERGEN_H |
| 16 | |
Chris Lattner | 0e5e49e | 2003-08-06 04:36:35 +0000 | [diff] [blame] | 17 | #include "TableGenBackend.h" |
Misha Brukman | 9fff7e1 | 2003-05-24 00:15:53 +0000 | [diff] [blame] | 18 | |
Brian Gaeke | d0fde30 | 2003-11-11 22:41:34 +0000 | [diff] [blame] | 19 | namespace llvm { |
| 20 | |
Chris Lattner | 0e5e49e | 2003-08-06 04:36:35 +0000 | [diff] [blame] | 21 | class CodeEmitterGen : public TableGenBackend { |
Misha Brukman | 9fff7e1 | 2003-05-24 00:15:53 +0000 | [diff] [blame] | 22 | RecordKeeper &Records; |
Misha Brukman | 9fff7e1 | 2003-05-24 00:15:53 +0000 | [diff] [blame] | 23 | public: |
| 24 | CodeEmitterGen(RecordKeeper &R) : Records(R) {} |
| 25 | |
Chris Lattner | 048c00d | 2003-08-01 04:38:18 +0000 | [diff] [blame] | 26 | // run - Output the code emitter |
| 27 | void run(std::ostream &o); |
Chris Lattner | aaa3939 | 2003-07-31 04:32:37 +0000 | [diff] [blame] | 28 | private: |
Misha Brukman | 9fff7e1 | 2003-05-24 00:15:53 +0000 | [diff] [blame] | 29 | void emitMachineOpEmitter(std::ostream &o, const std::string &Namespace); |
| 30 | void emitGetValueBit(std::ostream &o, const std::string &Namespace); |
| 31 | }; |
| 32 | |
Brian Gaeke | d0fde30 | 2003-11-11 22:41:34 +0000 | [diff] [blame] | 33 | } // End llvm namespace |
| 34 | |
Misha Brukman | 9fff7e1 | 2003-05-24 00:15:53 +0000 | [diff] [blame] | 35 | #endif |