|
167 | 167 | /// for both functions and classes. On windows its turned in to dllimport for
|
168 | 168 | /// library consumers, for other platforms its a default visibility attribute.
|
169 | 169 | ///
|
| 170 | +/// LLVM_ABI_FRIEND is for annotating friend function declarations when the |
| 171 | +/// target function's original declaration is annotated with LLVM_ABI. This |
| 172 | +/// macro matches the LLVM_ABI macro on Windows, on other platforms it does |
| 173 | +/// nothing. |
| 174 | +/// |
170 | 175 | /// LLVM_C_ABI is used to annotated functions and data that need to be exported
|
171 | 176 | /// for the libllvm-c API. This used both for the llvm-c headers and for the
|
172 | 177 | /// functions declared in the different Target's c++ source files that don't
|
|
183 | 188 | // missing symbol linker errors on windows.
|
184 | 189 | #if defined(LLVM_BUILD_STATIC)
|
185 | 190 | #define LLVM_ABI
|
| 191 | +#define LLVM_ABI_FRIEND |
186 | 192 | #define LLVM_TEMPLATE_ABI
|
187 | 193 | #define LLVM_EXPORT_TEMPLATE
|
188 | 194 | #define LLVM_ABI_EXPORT
|
|
196 | 202 | #define LLVM_TEMPLATE_ABI __declspec(dllimport)
|
197 | 203 | #define LLVM_EXPORT_TEMPLATE
|
198 | 204 | #endif
|
| 205 | +#define LLVM_ABI_FRIEND LLVM_ABI |
199 | 206 | #define LLVM_ABI_EXPORT __declspec(dllexport)
|
200 | 207 | #elif defined(__ELF__) || defined(__MINGW32__) || defined(_AIX) || \
|
201 | 208 | defined(__MVS__)
|
202 | 209 | #define LLVM_ABI LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
|
| 210 | +#define LLVM_ABI_FRIEND |
203 | 211 | #define LLVM_TEMPLATE_ABI LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
|
204 | 212 | #define LLVM_EXPORT_TEMPLATE
|
205 | 213 | #define LLVM_ABI_EXPORT LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
|
206 | 214 | #elif defined(__MACH__) || defined(__WASM__) || defined(__EMSCRIPTEN__)
|
207 | 215 | #define LLVM_ABI LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
|
| 216 | +#define LLVM_ABI_FRIEND |
208 | 217 | #define LLVM_TEMPLATE_ABI
|
209 | 218 | #define LLVM_EXPORT_TEMPLATE
|
210 | 219 | #define LLVM_ABI_EXPORT LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
|
211 | 220 | #endif
|
212 | 221 | #else
|
213 | 222 | #define LLVM_ABI
|
| 223 | +#define LLVM_ABI_FRIEND |
214 | 224 | #define LLVM_TEMPLATE_ABI
|
215 | 225 | #define LLVM_EXPORT_TEMPLATE
|
216 | 226 | #define LLVM_ABI_EXPORT
|
|
0 commit comments