Skip to content

Commit 968410f

Browse files
authored
[libclang] Add missing dllexport annotation (#147108)
All other declarations of clang-c already have CINDEX_LINKAGE. This missing annotation causes a linker error when building `tools/clang/unittests/libclang/CrashTests/libclangCrashTests.exe` for the Cygwin target. On the regular Win32 target, this issue went unnoticed because the entire libclang gtest-based testsuite is currently disabled for that platform.
1 parent 3b05edf commit 968410f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clang/include/clang-c/FatalErrorHandler.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,22 @@
1111
#define LLVM_CLANG_C_FATAL_ERROR_HANDLER_H
1212

1313
#include "clang-c/ExternC.h"
14+
#include "clang-c/Platform.h"
1415

1516
LLVM_CLANG_C_EXTERN_C_BEGIN
1617

1718
/**
1819
* Installs error handler that prints error message to stderr and calls abort().
1920
* Replaces currently installed error handler (if any).
2021
*/
21-
void clang_install_aborting_llvm_fatal_error_handler(void);
22+
CINDEX_LINKAGE void clang_install_aborting_llvm_fatal_error_handler(void);
2223

2324
/**
2425
* Removes currently installed error handler (if any).
2526
* If no error handler is intalled, the default strategy is to print error
2627
* message to stderr and call exit(1).
2728
*/
28-
void clang_uninstall_llvm_fatal_error_handler(void);
29+
CINDEX_LINKAGE void clang_uninstall_llvm_fatal_error_handler(void);
2930

3031
LLVM_CLANG_C_EXTERN_C_END
3132

0 commit comments

Comments
 (0)