summaryrefslogtreecommitdiff
path: root/utils/TableGen/InstrInfoEmitter.h
blob: bf7e6758a577ef3480a99fafca66a9fa598c5891 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//===- InstrInfoEmitter.h - Generate a Instruction Set Desc. ----*- C++ -*-===//
//
// This tablegen backend is responsible for emitting a description of the target
// instruction set for the code generator.
//
//===----------------------------------------------------------------------===//

#ifndef INSTRINFO_EMITTER_H
#define INSTRINFO_EMITTER_H

#include <iosfwd>
class RecordKeeper;

class InstrInfoEmitter {
  RecordKeeper &Records;
public:
  InstrInfoEmitter(RecordKeeper &R) : Records(R) {}
  
  // run - Output the instruction set description, returning true on failure.
  void run(std::ostream &o);

  // runEnums - Print out enum values for all of the instructions.
  void runEnums(std::ostream &o);
};

#endif