Skip to content

Commit 74ed68f

Browse files
committed
[llvm] additional comments
1 parent 3d62cf0 commit 74ed68f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/include/llvm/Support/Compiler.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,12 @@
199199
#define LLVM_ABI_EXPORT __declspec(dllexport)
200200
#elif (defined(__ELF__) || defined(__MINGW32__) || defined(_AIX) || \
201201
defined(__MVS__)) && __has_attribute(visibililty)
202+
// Use __attribute__((visibility(""))) syntax for visibility rather than
203+
// [[gnu::visibility("")]] because compilers are more permissive with its
204+
// placement.
202205
#define LLVM_ABI __attribute__((visibility("default")))
203206
#if defined(__GNUC__) && !defined(__clang__)
204-
// GCC produces warnings on visibility attributes applied to templates.
207+
// GCC produces warnings on visibility attributes applied to some templates.
205208
#define LLVM_TEMPLATE_ABI
206209
#else
207210
#define LLVM_TEMPLATE_ABI __attribute__((visibility("default")))

0 commit comments

Comments
 (0)