Skip to content

Commit bfd0999

Browse files
authored
Merge pull request #78821 from compnerd/tradewars
SourceKit: correct the macro definitions to avoid warnings on Windows
2 parents 1e2dcc0 + 1d2eb3b commit bfd0999

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

tools/SourceKit/tools/sourcekitd/bin/InProc/CodeCompletionSwiftInterop.h

+8-5
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,15 @@
4343
#define SWIFTIDE_END_DECLS
4444
#endif
4545

46-
#ifndef SWIFTIDE_PUBLIC
47-
#if defined(_MSC_VER)
48-
#define SWIFTIDE_PUBLIC __declspec(dllimport)
46+
#if defined(_WIN32)
47+
// NOTE: static builds are currently unsupported.
48+
# if defined(sourcekitd_EXPORTS)
49+
# define SWIFTIDE_PUBLIC __declspec(dllexport)
50+
# else
51+
# define SWIFTIDE_PUBLIC __declspec(dllimport)
52+
# endif
4953
#else
50-
#define SWIFTIDE_PUBLIC
51-
#endif
54+
# define SWIFTIDE_PUBLIC /**/
5255
#endif
5356

5457
#ifndef __has_feature

0 commit comments

Comments
 (0)