summaryrefslogtreecommitdiff
path: root/include/llvm/TableGen/Main.h
blob: 663779f176ca072dca28de0ab536f149efce48c5 (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/Main.h - tblgen entry point ----------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file declares the common entry point for tblgen tools.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_TABLEGEN_MAIN_H
#define LLVM_TABLEGEN_MAIN_H

namespace llvm {

class TableGenAction;

/// Run the table generator, performing the specified Action on parsed records.
int TableGenMain(char *argv0, TableGenAction &Action);

class RecordKeeper;
class raw_ostream;
typedef bool TableGenMainFn(raw_ostream &OS, RecordKeeper &Records);

/// Perform the action using Records, and write output to OS.
/// \returns true on error, false otherwise
int TableGenMain(char *argv0, TableGenMainFn *MainFn);

}

#endif