File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change 2121/* Define to enable reverse iteration of unordered llvm containers */
2222#cmakedefine01 LLVM_ENABLE_REVERSE_ITERATION
2323
24+ #if !defined(__has_attribute )
25+ #define __has_attribute (attribute ) 0
26+ #endif
27+
2428// Properly annotate EnableABIBreakingChecks or DisableABIBreakingChecks for
2529// export from shared library.
26- #if !defined(LLVM_ABI_GENERATING_ANNOTATIONS )
2730// TODO(https://github.com/llvm/llvm-project/issues/145406): eliminate need for
2831// two preprocessor definitions to gate LLVM_ABI macro definitions.
29- #if defined(LLVM_ENABLE_LLVM_EXPORT_ANNOTATIONS ) && !defined(LLVM_BUILD_STATIC )
30- #if defined(_WIN32 ) && !defined(__MINGW32__ )
32+ #if defined(LLVM_BUILD_STATIC ) || !defined(LLVM_ENABLE_LLVM_EXPORT_ANNOTATIONS )
33+ #define ABI_BREAKING_EXPORT_ABI
34+ #else
35+ #if defined(_WIN32 )
3136#if defined(LLVM_EXPORTS )
3237#define ABI_BREAKING_EXPORT_ABI __declspec(dllexport)
3338#else
3439#define ABI_BREAKING_EXPORT_ABI __declspec(dllimport)
3540#endif
36- #elif defined(__has_attribute ) && __has_attribute (visibility )
37- #define ABI_BREAKING_EXPORT_ABI __attribute__((visibility("default")))
38- #endif
39- #endif
40- #if !defined(ABI_BREAKING_EXPORT_ABI )
41+ #else
42+ #if __has_attribute (visibility )
43+ #define ABI_BREAKING_EXPORT_ABI __attribute__((__visibility__("default")))
44+ #else
4145#define ABI_BREAKING_EXPORT_ABI
4246#endif
4347#endif
48+ #endif
4449
4550/* Allow selectively disabling link-time mismatch checking so that header-only
4651 ADT content from LLVM can be used without linking libSupport. */
You can’t perform that action at this time.
0 commit comments