blob: 670572dc81034ff9ec6fea85c477f0482013db8a [file] [log] [blame]
Andrew Scull5e1ddfa2018-08-14 10:06:54 +01001//===- llvm/TableGen/Main.h - tblgen entry point ----------------*- 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// This file declares the common entry point for tblgen tools.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_TABLEGEN_MAIN_H
15#define LLVM_TABLEGEN_MAIN_H
16
17namespace llvm {
18
19class raw_ostream;
20class RecordKeeper;
21
22/// Perform the action using Records, and write output to OS.
23/// Returns true on error, false otherwise.
24using TableGenMainFn = bool (raw_ostream &OS, RecordKeeper &Records);
25
26int TableGenMain(char *argv0, TableGenMainFn *MainFn);
27
28} // end namespace llvm
29
30#endif // LLVM_TABLEGEN_MAIN_H