This header is included by C code so the functions need to have a prototype. Also, fix the function definitions so that they have C linkage rather than C++ linkage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373213
91177308-0d34-0410-b5e6-
96231b3b80d8
* Installs error handler that prints error message to stderr and calls abort().
* Replaces currently installed error handler (if any).
*/
-void clang_install_aborting_llvm_fatal_error_handler();
+void clang_install_aborting_llvm_fatal_error_handler(void);
/**
* Removes currently installed error handler (if any).
* If no error handler is intalled, the default strategy is to print error
* message to stderr and call exit(1).
*/
-void clang_uninstall_llvm_fatal_error_handler();
+void clang_uninstall_llvm_fatal_error_handler(void);
#ifdef __cplusplus
}
::abort();
}
-void clang_install_aborting_llvm_fatal_error_handler() {
+extern "C" {
+void clang_install_aborting_llvm_fatal_error_handler(void) {
llvm::remove_fatal_error_handler();
llvm::install_fatal_error_handler(aborting_fatal_error_handler, nullptr);
}
-void clang_uninstall_llvm_fatal_error_handler() {
+void clang_uninstall_llvm_fatal_error_handler(void) {
llvm::remove_fatal_error_handler();
}
+}
\ No newline at end of file