FatalErrorHandler.odin (1821B)
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 package libclang 10 11 12 13 when ODIN_OS == .Windows { 14 @(extra_linker_flags="/NODEFAULTLIB:libcmt") 15 foreign import lib { 16 "system:ntdll.lib", 17 "system:ucrt.lib", 18 "system:msvcrt.lib", 19 "system:legacy_stdio_definitions.lib", 20 "system:kernel32.lib", 21 "system:user32.lib", 22 "system:advapi32.lib", 23 "system:shell32.lib", 24 "system:ole32.lib", 25 "system:oleaut32.lib", 26 "system:uuid.lib", 27 "system:ws2_32.lib", 28 "system:version.lib", 29 "system:oldnames.lib", 30 "libclang.lib", 31 } 32 } else { 33 foreign import lib "system:clang" 34 } 35 36 // LLVM_CLANG_C_FATAL_ERROR_HANDLER_H :: 37 38 @(default_calling_convention="c", link_prefix="clang_") 39 foreign lib { 40 /** 41 * Installs error handler that prints error message to stderr and calls abort(). 42 * Replaces currently installed error handler (if any). 43 */ 44 install_aborting_llvm_fatal_error_handler :: proc() --- 45 46 /** 47 * Removes currently installed error handler (if any). 48 * If no error handler is intalled, the default strategy is to print error 49 * message to stderr and call exit(1). 50 */ 51 uninstall_llvm_fatal_error_handler :: proc() --- 52 }