Main.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- llvm/TableGen/Main.h - tblgen entry point ----------------*- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. //
  14. // This file declares the common entry point for tblgen tools.
  15. //
  16. //===----------------------------------------------------------------------===//
  17. #ifndef LLVM_TABLEGEN_MAIN_H
  18. #define LLVM_TABLEGEN_MAIN_H
  19. namespace llvm {
  20. class raw_ostream;
  21. class RecordKeeper;
  22. /// Perform the action using Records, and write output to OS.
  23. /// Returns true on error, false otherwise.
  24. using TableGenMainFn = bool (raw_ostream &OS, RecordKeeper &Records);
  25. int TableGenMain(const char *argv0, TableGenMainFn *MainFn);
  26. } // end namespace llvm
  27. #endif // LLVM_TABLEGEN_MAIN_H
  28. #ifdef __GNUC__
  29. #pragma GCC diagnostic pop
  30. #endif