FatalErrorHandler.h 1.2 KB

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