blob: 4e05da36168f7f697ef981b61c34cbd99b6753ea [file] [log] [blame]
Andrew Scull5e1ddfa2018-08-14 10:06:54 +01001//===- llvm/TableGen/Main.h - tblgen entry point ----------------*- C++ -*-===//
2//
Andrew Walbran16937d02019-10-22 13:54:20 +01003// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Andrew Scull5e1ddfa2018-08-14 10:06:54 +01006//
7//===----------------------------------------------------------------------===//
8//
9// This file declares the common entry point for tblgen tools.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_TABLEGEN_MAIN_H
14#define LLVM_TABLEGEN_MAIN_H
15
16namespace llvm {
17
18class raw_ostream;
19class RecordKeeper;
20
21/// Perform the action using Records, and write output to OS.
22/// Returns true on error, false otherwise.
23using TableGenMainFn = bool (raw_ostream &OS, RecordKeeper &Records);
24
Olivier Deprezf4ef2d02021-04-20 13:36:24 +020025int TableGenMain(const char *argv0, TableGenMainFn *MainFn);
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010026
27} // end namespace llvm
28
29#endif // LLVM_TABLEGEN_MAIN_H