blob: d7b4bc1adff88875c45440139c54c201e470212d [file] [log] [blame]
Misha Brukman9fff7e12003-05-24 00:15:53 +00001//===- CodeEmitterGen.h - Code Emitter Generator ----------------*- C++ -*-===//
John Criswell01d45822003-10-20 20:20:30 +00002//
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 Brukman9fff7e12003-05-24 00:15:53 +00009//
Chris Lattneraaa39392003-07-31 04:32:37 +000010// FIXME: document
Misha Brukman9fff7e12003-05-24 00:15:53 +000011//
12//===----------------------------------------------------------------------===//
13
14#ifndef CODEMITTERGEN_H
15#define CODEMITTERGEN_H
16
Chris Lattner0e5e49e2003-08-06 04:36:35 +000017#include "TableGenBackend.h"
Misha Brukman9fff7e12003-05-24 00:15:53 +000018
Chris Lattner0e5e49e2003-08-06 04:36:35 +000019class CodeEmitterGen : public TableGenBackend {
Misha Brukman9fff7e12003-05-24 00:15:53 +000020 RecordKeeper &Records;
Misha Brukman9fff7e12003-05-24 00:15:53 +000021public:
22 CodeEmitterGen(RecordKeeper &R) : Records(R) {}
23
Chris Lattner048c00d2003-08-01 04:38:18 +000024 // run - Output the code emitter
25 void run(std::ostream &o);
Chris Lattneraaa39392003-07-31 04:32:37 +000026private:
Misha Brukman9fff7e12003-05-24 00:15:53 +000027 void emitMachineOpEmitter(std::ostream &o, const std::string &Namespace);
28 void emitGetValueBit(std::ostream &o, const std::string &Namespace);
29};
30
31#endif