LLVM 20.0.0git
Main.h
Go to the documentation of this file.
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.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_TABLEGEN_MAIN_H
14#define LLVM_TABLEGEN_MAIN_H
15
16#include <functional>
17
18namespace llvm {
19
20class raw_ostream;
21class RecordKeeper;
22
23/// Perform the action using Records, and write output to OS.
24/// Returns true on error, false otherwise.
26
27int TableGenMain(const char *argv0,
28 std::function<TableGenMainFn> MainFn = nullptr);
29
30} // end namespace llvm
31
32#endif // LLVM_TABLEGEN_MAIN_H
raw_pwrite_stream & OS
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
bool(raw_ostream &OS, RecordKeeper &Records) TableGenMainFn
Perform the action using Records, and write output to OS.
Definition: Main.h:25
int TableGenMain(const char *argv0, std::function< TableGenMainFn > MainFn=nullptr)
Definition: Main.cpp:98