2003-05-24 00:15:53 +00:00
|
|
|
//===- CodeEmitterGen.h - Code Emitter Generator ----------------*- C++ -*-===//
|
|
|
|
//
|
2003-07-31 04:32:37 +00:00
|
|
|
// FIXME: document
|
2003-05-24 00:15:53 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef CODEMITTERGEN_H
|
|
|
|
#define CODEMITTERGEN_H
|
|
|
|
|
2003-07-31 04:43:49 +00:00
|
|
|
#include <string>
|
|
|
|
#include <iosfwd>
|
|
|
|
class RecordKeeper;
|
2003-05-24 00:15:53 +00:00
|
|
|
|
2003-07-31 04:32:37 +00:00
|
|
|
class CodeEmitterGen {
|
2003-05-24 00:15:53 +00:00
|
|
|
RecordKeeper &Records;
|
|
|
|
public:
|
|
|
|
CodeEmitterGen(RecordKeeper &R) : Records(R) {}
|
|
|
|
|
2003-08-01 04:38:18 +00:00
|
|
|
// run - Output the code emitter
|
|
|
|
void run(std::ostream &o);
|
2003-07-31 04:32:37 +00:00
|
|
|
private:
|
2003-05-24 00:15:53 +00:00
|
|
|
void emitMachineOpEmitter(std::ostream &o, const std::string &Namespace);
|
|
|
|
void emitGetValueBit(std::ostream &o, const std::string &Namespace);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|