FatalErrorHandler.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. /*===-- clang-c/FatalErrorHandler.h - Fatal Error Handling --------*- C -*-===*\
  7. |* *|
  8. |* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
  9. |* Exceptions. *|
  10. |* See https://llvm.org/LICENSE.txt for license information. *|
  11. |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
  12. |* *|
  13. \*===----------------------------------------------------------------------===*/
  14. #ifndef LLVM_CLANG_C_FATAL_ERROR_HANDLER_H
  15. #define LLVM_CLANG_C_FATAL_ERROR_HANDLER_H
  16. #include "clang-c/ExternC.h"
  17. LLVM_CLANG_C_EXTERN_C_BEGIN
  18. /**
  19. * Installs error handler that prints error message to stderr and calls abort().
  20. * Replaces currently installed error handler (if any).
  21. */
  22. void clang_install_aborting_llvm_fatal_error_handler(void);
  23. /**
  24. * Removes currently installed error handler (if any).
  25. * If no error handler is intalled, the default strategy is to print error
  26. * message to stderr and call exit(1).
  27. */
  28. void clang_uninstall_llvm_fatal_error_handler(void);
  29. LLVM_CLANG_C_EXTERN_C_END
  30. #endif
  31. #ifdef __GNUC__
  32. #pragma GCC diagnostic pop
  33. #endif