[clang] [llvm] [clang] Clean up the Clang export annotations (PR #239750)

Fabrice de Gans via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 10 03:21:10 PST 2026


================
@@ -56,17 +54,22 @@
 #define CLANG_EXPORT_TEMPLATE
 #endif
 #define CLANG_ABI_EXPORT __declspec(dllexport)
-#elif defined(__ELF__) || defined(__MINGW32__) || defined(_AIX) ||             \
-    defined(__MVS__) || defined(__CYGWIN__)
-#define CLANG_ABI LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
-#define CLANG_ABI_EXPORT LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
-#define CLANG_TEMPLATE_ABI LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
+#elif __has_attribute(visibility)
+#if defined(__ELF__) || defined(__MINGW32__) || defined(_AIX) ||               \
+    defined(__MVS__) || defined(__CYGWIN__) || defined(__MACH__) ||            \
+    defined(__wasm__) || defined(__EMSCRIPTEN__)
----------------
Steelskin wrote:

I removed that block, I'll follow up separately for LLVM.

https://github.com/llvm/llvm-project/pull/239750


More information about the cfe-commits mailing list