File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 131131#if (!(defined(_WIN32) || defined(__CYGWIN__)) || \
132132 (defined (__MINGW32__) && defined (__clang__)))
133133#define LLVM_LIBRARY_VISIBILITY LLVM_ATTRIBUTE_VISIBILITY_HIDDEN
134+ // Clang compilers older then 15 do not support gnu style attributes on
135+ // namespaces.
136+ #if defined(__clang__) && __clang_major__ < 15
137+ #define LLVM_LIBRARY_VISIBILITY_NAMESPACE [[gnu::visibility(" hidden" )]]
138+ #else
139+ #define LLVM_LIBRARY_VISIBILITY_NAMESPACE LLVM_ATTRIBUTE_VISIBILITY_HIDDEN
140+ #endif
134141#define LLVM_ALWAYS_EXPORT LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
135142#elif defined(_WIN32)
136143#define LLVM_ALWAYS_EXPORT __declspec (dllexport)
137144#define LLVM_LIBRARY_VISIBILITY
145+ #define LLVM_LIBRARY_VISIBILITY_NAMESPACE
138146#else
139147#define LLVM_LIBRARY_VISIBILITY
140148#define LLVM_ALWAYS_EXPORT
149+ #define LLVM_LIBRARY_VISIBILITY_NAMESPACE
141150#endif
142151
143152// / LLVM_ABI is the main export/visibility macro to mark something as explicitly
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ class TargetLibraryInfo;
5656class Value ;
5757// / A private "module" namespace for types and utilities used by GVN. These
5858// / are implementation details and should not be used by clients.
59- namespace LLVM_LIBRARY_VISIBILITY gvn {
59+ namespace LLVM_LIBRARY_VISIBILITY_NAMESPACE gvn {
6060
6161struct AvailableValue ;
6262struct AvailableValueInBlock ;
You can’t perform that action at this time.
0 commit comments