File tree Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change 116
116
#endif
117
117
118
118
119
- #ifndef SWIFT_GNUC_PREREQ
120
- # if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
121
- # define SWIFT_GNUC_PREREQ (maj, min, patch ) \
122
- ((__GNUC__ << 20 ) + (__GNUC_MINOR__ << 10 ) + __GNUC_PATCHLEVEL__ >= \
123
- ((maj) << 20 ) + ((min) << 10 ) + (patch))
124
- # elif defined(__GNUC__) && defined(__GNUC_MINOR__)
125
- # define SWIFT_GNUC_PREREQ (maj, min, patch ) \
126
- ((__GNUC__ << 20 ) + (__GNUC_MINOR__ << 10 ) >= ((maj) << 20 ) + ((min) << 10 ))
127
- # else
128
- # define SWIFT_GNUC_PREREQ (maj, min, patch ) 0
129
- # endif
130
- #endif
131
-
132
119
// / Attributes for runtime-stdlib interfaces.
133
120
// / Use these for C implementations that are imported into Swift via SwiftShims
134
121
// / and for C implementations of Swift @_silgen_name declarations
151
138
152
139
// Match the definition of LLVM_LIBRARY_VISIBILITY from LLVM's
153
140
// Compiler.h. That header requires C++ and this needs to work in C.
154
- #if (__has_attribute(visibility) || SWIFT_GNUC_PREREQ(4, 0, 0)) && \
155
- !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(_WIN32)
156
- #define SWIFT_LIBRARY_VISIBILITY __attribute__ ((visibility(" hidden" )))
141
+ #if __has_attribute(visibility) && (defined(__ELF__) || defined(__MACH__))
142
+ #define SWIFT_LIBRARY_VISIBILITY __attribute__ ((__visibility__(" hidden" )))
157
143
#else
158
144
#define SWIFT_LIBRARY_VISIBILITY
159
145
#endif
You can’t perform that action at this time.
0 commit comments