[llvm] [llvm] revisions to `LLVM_ABI` export macro definitions (PR #144598)
Andrew Rogers via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 18 13:19:36 PDT 2025
================
@@ -206,25 +190,24 @@
#define LLVM_TEMPLATE_ABI __declspec(dllimport)
#define LLVM_EXPORT_TEMPLATE
#endif
-#define LLVM_ABI_FRIEND LLVM_ABI
#define LLVM_ABI_EXPORT __declspec(dllexport)
-#elif defined(__ELF__) || defined(__MINGW32__) || defined(_AIX) || \
+#elif __has_attribute(visibility)
+#if defined(__ELF__) || defined(__MINGW32__) || defined(_AIX) || \
defined(__MVS__) || defined(__CYGWIN__)
-#define LLVM_ABI LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
-#define LLVM_ABI_FRIEND
-#define LLVM_TEMPLATE_ABI LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
+#define LLVM_ABI __attribute__((visibility("default")))
----------------
andrurogerz wrote:
`LLVM_ATTRIBUTE_VISIBILITY_DEFAULT` is defined like this earlier in the file, and I'd prefer to be consistent:
```
#define LLVM_ATTRIBUTE_VISIBILITY_DEFAULT __attribute__((visibility("default")))
```
https://github.com/llvm/llvm-project/pull/144598
More information about the llvm-commits
mailing list