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 131
131
#if (!(defined(_WIN32) || defined(__CYGWIN__)) || \
132
132
(defined(__MINGW32__) && defined(__clang__)))
133
133
#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
134
141
#define LLVM_ALWAYS_EXPORT LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
135
142
#elif defined(_WIN32)
136
143
#define LLVM_ALWAYS_EXPORT __declspec (dllexport)
137
144
#define LLVM_LIBRARY_VISIBILITY
145
+ #define LLVM_LIBRARY_VISIBILITY_NAMESPACE
138
146
#else
139
147
#define LLVM_LIBRARY_VISIBILITY
140
148
#define LLVM_ALWAYS_EXPORT
149
+ #define LLVM_LIBRARY_VISIBILITY_NAMESPACE
141
150
#endif
142
151
143
152
// / 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;
56
56
class Value ;
57
57
// / A private "module" namespace for types and utilities used by GVN. These
58
58
// / are implementation details and should not be used by clients.
59
- namespace LLVM_LIBRARY_VISIBILITY gvn {
59
+ namespace LLVM_LIBRARY_VISIBILITY_NAMESPACE gvn {
60
60
61
61
struct AvailableValue ;
62
62
struct AvailableValueInBlock ;
You can’t perform that action at this time.
0 commit comments