we don't want people to override printBasicBlockLabel.
[llvm/avr.git] / utils / TableGen / CodeEmitterGen.h
blobf0b3229c0411a4b8da8791a7202d426e63f04922
1 //===- CodeEmitterGen.h - Code Emitter Generator ----------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // FIXME: document
12 //===----------------------------------------------------------------------===//
14 #ifndef CODEMITTERGEN_H
15 #define CODEMITTERGEN_H
17 #include "TableGenBackend.h"
18 #include <map>
19 #include <vector>
20 #include <string>
22 namespace llvm {
24 class RecordVal;
25 class BitsInit;
27 class CodeEmitterGen : public TableGenBackend {
28 RecordKeeper &Records;
29 public:
30 CodeEmitterGen(RecordKeeper &R) : Records(R) {}
32 // run - Output the code emitter
33 void run(raw_ostream &o);
34 private:
35 void emitMachineOpEmitter(raw_ostream &o, const std::string &Namespace);
36 void emitGetValueBit(raw_ostream &o, const std::string &Namespace);
37 void reverseBits(std::vector<Record*> &Insts);
38 int getVariableBit(const std::string &VarName, BitsInit *BI, int bit);
41 } // End llvm namespace
43 #endif