blob: b9e8c49d4c5a978f40af8b7fae4dc32c8cf19819 [file] [log] [blame]
Chris Lattner2c0f2c72003-08-06 04:23:04 +00001//===- TableGenBackend.h - Base class for TableGen Backends -----*- C++ -*-===//
2//
3// The TableGenBackend class is provided as a common interface for all TableGen
4// backends. It provides useful services and an standardized interface.
5//
6//===----------------------------------------------------------------------===//
7
8#ifndef TABLEGENBACKEND_H
9#define TABLEGENBACKEND_H
10
11#include <string>
12#include <iosfwd>
13
14struct TableGenBackend {
15
16 // run - All TableGen backends should implement the run method, which should
17 // be the main entry point.
18 virtual void run(std::ostream &OS) = 0;
19
20
21public: // Useful helper routines...
22 void EmitSourceFileHeader(const std::string &Desc, std::ostream &OS) const;
23
24};
25
26#endif