[Alignment][NFC] Support compile time constants
[llvm-core.git] / include / llvm / TableGen / Main.h
blobe464cd4d4fb574f23a429e66a5724ac0cc62658b
1 //===- llvm/TableGen/Main.h - tblgen entry point ----------------*- C++ -*-===//
2 //
3 // 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
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares the common entry point for tblgen tools.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_TABLEGEN_MAIN_H
14 #define LLVM_TABLEGEN_MAIN_H
16 namespace llvm {
18 class raw_ostream;
19 class RecordKeeper;
21 /// Perform the action using Records, and write output to OS.
22 /// Returns true on error, false otherwise.
23 using TableGenMainFn = bool (raw_ostream &OS, RecordKeeper &Records);
25 int TableGenMain(char *argv0, TableGenMainFn *MainFn);
27 } // end namespace llvm
29 #endif // LLVM_TABLEGEN_MAIN_H