2003-10-06 03:27:59 +08:00
|
|
|
//===- CodeEmitterGen.h - Code Emitter Generator ----------------*- C++ -*-===//
|
2003-10-21 04:20:30 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file was developed by the LLVM research group and is distributed under
|
|
|
|
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
2003-10-06 03:27:59 +08:00
|
|
|
//
|
|
|
|
// FIXME: document
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef CODEMITTERGEN_H
|
|
|
|
#define CODEMITTERGEN_H
|
|
|
|
|
|
|
|
#include "TableGenBackend.h"
|
|
|
|
|
2003-11-12 06:41:34 +08:00
|
|
|
namespace llvm {
|
|
|
|
|
2003-10-06 03:27:59 +08:00
|
|
|
class CodeEmitterGen : public TableGenBackend {
|
|
|
|
RecordKeeper &Records;
|
|
|
|
public:
|
|
|
|
CodeEmitterGen(RecordKeeper &R) : Records(R) {}
|
|
|
|
|
|
|
|
// run - Output the code emitter
|
|
|
|
void run(std::ostream &o);
|
|
|
|
private:
|
|
|
|
void emitMachineOpEmitter(std::ostream &o, const std::string &Namespace);
|
|
|
|
void emitGetValueBit(std::ostream &o, const std::string &Namespace);
|
|
|
|
};
|
|
|
|
|
2003-11-12 06:41:34 +08:00
|
|
|
} // End llvm namespace
|
|
|
|
|
2003-10-06 03:27:59 +08:00
|
|
|
#endif
|