blob: 19ca5452f5516e64f2d71eca1544f25651df747c [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
Brian Gaeked0fde302003-11-11 22:41:34 +000019namespace llvm {
20
Chris Lattner0e5e49e2003-08-06 04:36:35 +000021class CodeEmitterGen : public TableGenBackend {
Misha Brukman9fff7e12003-05-24 00:15:53 +000022 RecordKeeper &Records;
Misha Brukman9fff7e12003-05-24 00:15:53 +000023public:
24 CodeEmitterGen(RecordKeeper &R) : Records(R) {}
25
Chris Lattner048c00d2003-08-01 04:38:18 +000026 // run - Output the code emitter
27 void run(std::ostream &o);
Chris Lattneraaa39392003-07-31 04:32:37 +000028private:
Misha Brukman9fff7e12003-05-24 00:15:53 +000029 void emitMachineOpEmitter(std::ostream &o, const std::string &Namespace);
30 void emitGetValueBit(std::ostream &o, const std::string &Namespace);
31};
32
Brian Gaeked0fde302003-11-11 22:41:34 +000033} // End llvm namespace
34
Misha Brukman9fff7e12003-05-24 00:15:53 +000035#endif