summaryrefslogtreecommitdiff
path: root/include/llvm/TableGen/TableGenAction.h
blob: 9f1c23c5b4574abaec9b137a5c4e60567c97a604 (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
27
28
29
30
31
32
33
34
//===- llvm/TableGen/TableGenAction.h - defines TableGenAction --*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines the TableGenAction base class to be derived from by
// tblgen tools.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_TABLEGEN_TABLEGENACTION_H
#define LLVM_TABLEGEN_TABLEGENACTION_H

namespace llvm {

class raw_ostream;
class RecordKeeper;

class TableGenAction {
public:
  virtual ~TableGenAction() {}

  /// Perform the action using Records, and write output to OS.
  /// @returns true on error, false otherwise
  virtual bool operator()(raw_ostream &OS, RecordKeeper &Records) = 0;
};

}

#endif