blob: 7ae3ef8d92c12b579488ba26167310082b0f0b29 [file] [log] [blame]
Misha Brukman9fff7e12003-05-24 00:15:53 +00001//===- CodeEmitterGen.h - Code Emitter Generator ----------------*- C++ -*-===//
2//
Chris Lattneraaa39392003-07-31 04:32:37 +00003// FIXME: document
Misha Brukman9fff7e12003-05-24 00:15:53 +00004//
5//===----------------------------------------------------------------------===//
6
7#ifndef CODEMITTERGEN_H
8#define CODEMITTERGEN_H
9
Chris Lattnerc9670ef2003-07-31 04:43:49 +000010#include <string>
11#include <iosfwd>
12class RecordKeeper;
Misha Brukman9fff7e12003-05-24 00:15:53 +000013
Chris Lattneraaa39392003-07-31 04:32:37 +000014class CodeEmitterGen {
Misha Brukman9fff7e12003-05-24 00:15:53 +000015 RecordKeeper &Records;
Misha Brukman9fff7e12003-05-24 00:15:53 +000016public:
17 CodeEmitterGen(RecordKeeper &R) : Records(R) {}
18
Chris Lattner048c00d2003-08-01 04:38:18 +000019 // run - Output the code emitter
20 void run(std::ostream &o);
Chris Lattneraaa39392003-07-31 04:32:37 +000021private:
Misha Brukman9fff7e12003-05-24 00:15:53 +000022 void emitMachineOpEmitter(std::ostream &o, const std::string &Namespace);
23 void emitGetValueBit(std::ostream &o, const std::string &Namespace);
24};
25
26#endif