1 //===- llvm/TableGen/Main.h - tblgen entry point ----------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file declares the common entry point for tblgen tools.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_TABLEGEN_MAIN_H
15 #define LLVM_TABLEGEN_MAIN_H
21 /// Run the table generator, performing the specified Action on parsed records.
22 int TableGenMain(char *argv0, TableGenAction &Action);
26 typedef bool TableGenMainFn(raw_ostream &OS, RecordKeeper &Records);
28 /// Perform the action using Records, and write output to OS.
29 /// \returns true on error, false otherwise
30 int TableGenMain(char *argv0, TableGenMainFn *MainFn);