Skip to content

Commit 1f80d21

Browse files
authored
Merge pull request #18340 from Azoy/remove-_interface
[Visibility] Remove _INTERFACE
2 parents 23781df + b8fc8b3 commit 1f80d21

23 files changed

+129
-132
lines changed

include/swift/Runtime/Metadata.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,11 +748,11 @@ void swift_registerFieldDescriptors(const reflection::FieldDescriptor **records,
748748
/// Return the superclass, if any. The result is nullptr for root
749749
/// classes and class protocol types.
750750
SWIFT_CC(swift)
751-
SWIFT_RUNTIME_STDLIB_INTERFACE
751+
SWIFT_RUNTIME_STDLIB_API
752752
const Metadata *_swift_class_getSuperclass(const Metadata *theClass);
753753

754754
SWIFT_CC(swift)
755-
SWIFT_RUNTIME_STDLIB_INTERFACE
755+
SWIFT_RUNTIME_STDLIB_API
756756
void swift_getFieldAt(
757757
const Metadata *base, unsigned index,
758758
void (*callback)(const char *name, const Metadata *type, void *ctx), void *callbackCtx);

stdlib/public/SwiftShims/AssertionReporting.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace swift { extern "C" {
2929
/// <prefix>: <message>: file <file>, line <line>\n
3030
///
3131
/// The message may be omitted by passing messageLength=0.
32-
SWIFT_RUNTIME_STDLIB_INTERFACE
32+
SWIFT_RUNTIME_STDLIB_API
3333
void _swift_stdlib_reportFatalErrorInFile(
3434
const unsigned char *prefix, int prefixLength,
3535
const unsigned char *message, int messageLength,
@@ -40,7 +40,7 @@ void _swift_stdlib_reportFatalErrorInFile(
4040
/// Report a fatal error to system console, stderr, and crash logs.
4141
///
4242
/// <prefix>: <message>\n
43-
SWIFT_RUNTIME_STDLIB_INTERFACE
43+
SWIFT_RUNTIME_STDLIB_API
4444
void _swift_stdlib_reportFatalError(
4545
const unsigned char *prefix, int prefixLength,
4646
const unsigned char *message, int messageLength,
@@ -50,7 +50,7 @@ void _swift_stdlib_reportFatalError(
5050
///
5151
/// <file>: <line>: <column>: fatal error: use of unimplemented
5252
/// initializer '<initName>' for class '<className>'
53-
SWIFT_RUNTIME_STDLIB_INTERFACE
53+
SWIFT_RUNTIME_STDLIB_API
5454
void _swift_stdlib_reportUnimplementedInitializerInFile(
5555
const unsigned char *className, int classNameLength,
5656
const unsigned char *initName, int initNameLength,
@@ -62,7 +62,7 @@ void _swift_stdlib_reportUnimplementedInitializerInFile(
6262
///
6363
/// fatal error: use of unimplemented initializer '<initName>'
6464
/// for class 'className'
65-
SWIFT_RUNTIME_STDLIB_INTERFACE
65+
SWIFT_RUNTIME_STDLIB_API
6666
void _swift_stdlib_reportUnimplementedInitializer(
6767
const unsigned char *className, int classNameLength,
6868
const unsigned char *initName, int initNameLength,

stdlib/public/SwiftShims/CoreFoundationShims.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,58 +56,58 @@ typedef __swift_uint16_t _swift_shims_UniChar;
5656
typedef __swift_uint8_t _swift_shims_UInt8;
5757

5858
// Buffer is nullable in case the string is zero-length.
59-
SWIFT_RUNTIME_STDLIB_INTERFACE
59+
SWIFT_RUNTIME_STDLIB_API
6060
void _swift_stdlib_CFStringGetCharacters(
6161
_swift_shims_CFStringRef _Nonnull theString, _swift_shims_CFRange range,
6262
_swift_shims_UniChar *_Nullable buffer);
6363

64-
SWIFT_RUNTIME_STDLIB_INTERFACE
64+
SWIFT_RUNTIME_STDLIB_API
6565
_swift_shims_CFIndex _swift_stdlib_CFStringGetBytes(
6666
_swift_shims_CFStringRef _Nonnull theString, _swift_shims_CFRange range,
6767
_swift_shims_CFStringEncoding encoding, _swift_shims_UInt8 lossByte,
6868
_swift_shims_Boolean isExternalRepresentation,
6969
_swift_shims_UInt8 *_Nonnull buffer, _swift_shims_CFIndex maxBufLen,
7070
_swift_shims_CFIndex *_Nullable usedBufLen);
7171

72-
SWIFT_RUNTIME_STDLIB_INTERFACE
72+
SWIFT_RUNTIME_STDLIB_API
7373
const _swift_shims_UniChar *_Nullable _swift_stdlib_CFStringGetCharactersPtr(
7474
_swift_shims_CFStringRef _Nonnull theString);
7575

76-
SWIFT_RUNTIME_STDLIB_INTERFACE
76+
SWIFT_RUNTIME_STDLIB_API
7777
_swift_shims_CFIndex _swift_stdlib_CFStringGetLength(
7878
_swift_shims_CFStringRef _Nonnull theString);
7979

80-
SWIFT_RUNTIME_STDLIB_INTERFACE
80+
SWIFT_RUNTIME_STDLIB_API
8181
__attribute__((ns_returns_retained))
8282
_swift_shims_CFStringRef _Nonnull _swift_stdlib_CFStringCreateWithSubstring(
8383
_swift_shims_CFAllocatorRef _Nullable alloc,
8484
_swift_shims_CFStringRef _Nonnull str, _swift_shims_CFRange range);
8585

86-
SWIFT_RUNTIME_STDLIB_INTERFACE
86+
SWIFT_RUNTIME_STDLIB_API
8787
_swift_shims_UniChar _swift_stdlib_CFStringGetCharacterAtIndex(
8888
_swift_shims_CFStringRef _Nonnull theString, _swift_shims_CFIndex idx);
8989

90-
SWIFT_RUNTIME_STDLIB_INTERFACE
90+
SWIFT_RUNTIME_STDLIB_API
9191
__attribute__((ns_returns_retained))
9292
_swift_shims_CFStringRef _Nonnull _swift_stdlib_CFStringCreateCopy(
9393
_swift_shims_CFAllocatorRef _Nullable alloc,
9494
_swift_shims_CFStringRef _Nonnull theString);
9595

96-
SWIFT_RUNTIME_STDLIB_INTERFACE
96+
SWIFT_RUNTIME_STDLIB_API
9797
__attribute__((ns_returns_retained))
9898
_swift_shims_CFStringRef _Nonnull _swift_stdlib_CFStringCreateWithBytes(
9999
_swift_shims_CFAllocatorRef _Nullable alloc,
100100
const __swift_uint8_t *_Nonnull bytes, _swift_shims_CFIndex numBytes,
101101
_swift_shims_CFStringEncoding encoding,
102102
_swift_shims_Boolean isExternalRepresentation);
103103

104-
SWIFT_RUNTIME_STDLIB_INTERFACE
104+
SWIFT_RUNTIME_STDLIB_API
105105
const char *_Nullable _swift_stdlib_CFStringGetCStringPtr(
106106
_swift_shims_CFStringRef _Nonnull theString,
107107

108108
_swift_shims_CFStringEncoding encoding);
109109

110-
SWIFT_RUNTIME_STDLIB_INTERFACE
110+
SWIFT_RUNTIME_STDLIB_API
111111
_swift_shims_CFStringRef _Nonnull _swift_stdlib_objcDebugDescription(
112112
id _Nonnull nsObject);
113113
#endif // __OBJC2__

stdlib/public/SwiftShims/FoundationShims.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ typedef struct {
5454
__swift_intptr_t patchVersion;
5555
} _SwiftNSOperatingSystemVersion;
5656

57-
SWIFT_RUNTIME_STDLIB_INTERFACE
57+
SWIFT_RUNTIME_STDLIB_API
5858
_SwiftNSOperatingSystemVersion _swift_stdlib_operatingSystemVersion();
5959

6060
#ifdef __cplusplus

stdlib/public/SwiftShims/GlobalObjects.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct _SwiftEmptyArrayStorage {
3737
struct _SwiftArrayBodyStorage body;
3838
};
3939

40-
SWIFT_RUNTIME_STDLIB_INTERFACE
40+
SWIFT_RUNTIME_STDLIB_API
4141
struct _SwiftEmptyArrayStorage _swiftEmptyArrayStorage;
4242

4343
struct _SwiftUnsafeBitMap {
@@ -72,10 +72,10 @@ struct _SwiftEmptySetStorage {
7272
__swift_uintptr_t entries;
7373
};
7474

75-
SWIFT_RUNTIME_STDLIB_INTERFACE
75+
SWIFT_RUNTIME_STDLIB_API
7676
struct _SwiftEmptyDictionaryStorage _swiftEmptyDictionaryStorage;
7777

78-
SWIFT_RUNTIME_STDLIB_INTERFACE
78+
SWIFT_RUNTIME_STDLIB_API
7979
struct _SwiftEmptySetStorage _swiftEmptySetStorage;
8080

8181
struct _SwiftHashingParameters {
@@ -84,7 +84,7 @@ struct _SwiftHashingParameters {
8484
__swift_bool deterministic;
8585
};
8686

87-
SWIFT_RUNTIME_STDLIB_INTERFACE
87+
SWIFT_RUNTIME_STDLIB_API
8888
struct _SwiftHashingParameters _swift_stdlib_Hashing_parameters;
8989

9090
#ifdef __cplusplus

stdlib/public/SwiftShims/HeapObject.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,17 @@ struct HeapObject {
6767
extern "C" {
6868
#endif
6969

70-
SWIFT_RUNTIME_STDLIB_INTERFACE
70+
SWIFT_RUNTIME_STDLIB_API
7171
void _swift_instantiateInertHeapObject(void *address,
7272
const HeapMetadata *metadata);
7373

74-
SWIFT_RUNTIME_STDLIB_INTERFACE
74+
SWIFT_RUNTIME_STDLIB_API
7575
__swift_size_t swift_retainCount(HeapObject *obj);
7676

77-
SWIFT_RUNTIME_STDLIB_INTERFACE
77+
SWIFT_RUNTIME_STDLIB_API
7878
__swift_size_t swift_unownedRetainCount(HeapObject *obj);
7979

80-
SWIFT_RUNTIME_STDLIB_INTERFACE
80+
SWIFT_RUNTIME_STDLIB_API
8181
__swift_size_t swift_weakRetainCount(HeapObject *obj);
8282

8383
#ifdef __cplusplus

stdlib/public/SwiftShims/RuntimeShims.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,33 +27,33 @@ namespace swift { extern "C" {
2727
#endif
2828

2929
/// Return an NSString to be used as the Mirror summary of the object
30-
SWIFT_RUNTIME_STDLIB_INTERFACE
30+
SWIFT_RUNTIME_STDLIB_API
3131
void *_swift_objCMirrorSummary(const void * nsObject);
3232

3333
/// Call strtold_l with the C locale, swapping argument and return
3434
/// types so we can operate on Float80. Return NULL on overflow.
35-
SWIFT_RUNTIME_STDLIB_INTERFACE
35+
SWIFT_RUNTIME_STDLIB_API
3636
const char *_swift_stdlib_strtold_clocale(const char *nptr, void *outResult);
3737
/// Call strtod_l with the C locale, swapping argument and return
3838
/// types so we can operate consistently on Float80. Return NULL on
3939
/// overflow.
40-
SWIFT_RUNTIME_STDLIB_INTERFACE
40+
SWIFT_RUNTIME_STDLIB_API
4141
const char *_swift_stdlib_strtod_clocale(const char *nptr, double *outResult);
4242
/// Call strtof_l with the C locale, swapping argument and return
4343
/// types so we can operate consistently on Float80. Return NULL on
4444
/// overflow.
45-
SWIFT_RUNTIME_STDLIB_INTERFACE
45+
SWIFT_RUNTIME_STDLIB_API
4646
const char *_swift_stdlib_strtof_clocale(const char *nptr, float *outResult);
4747

48-
SWIFT_RUNTIME_STDLIB_INTERFACE
48+
SWIFT_RUNTIME_STDLIB_API
4949
void _swift_stdlib_flockfile_stdout(void);
50-
SWIFT_RUNTIME_STDLIB_INTERFACE
50+
SWIFT_RUNTIME_STDLIB_API
5151
void _swift_stdlib_funlockfile_stdout(void);
5252

53-
SWIFT_RUNTIME_STDLIB_INTERFACE
53+
SWIFT_RUNTIME_STDLIB_API
5454
int _swift_stdlib_putc_stderr(int C);
5555

56-
SWIFT_RUNTIME_STDLIB_INTERFACE
56+
SWIFT_RUNTIME_STDLIB_API
5757
__swift_size_t _swift_stdlib_getHardwareConcurrency();
5858

5959
#ifdef __cplusplus

stdlib/public/SwiftShims/RuntimeStubs.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ namespace swift { extern "C" {
2727

2828
SWIFT_BEGIN_NULLABILITY_ANNOTATIONS
2929

30-
SWIFT_RUNTIME_STDLIB_INTERFACE
30+
SWIFT_RUNTIME_STDLIB_API
3131
__swift_ssize_t
3232
swift_stdlib_readLine_stdin(unsigned char * _Nullable * _Nonnull LinePtr);
3333

34-
SWIFT_RUNTIME_STDLIB_INTERFACE
34+
SWIFT_RUNTIME_STDLIB_API
3535
char * _Nullable * _Nonnull
3636
_swift_stdlib_getUnsafeArgvArgc(int * _Nonnull outArgLen);
3737

38-
SWIFT_RUNTIME_STDLIB_INTERFACE
38+
SWIFT_RUNTIME_STDLIB_API
3939
void
4040
_swift_stdlib_overrideUnsafeArgvArgc(char * _Nullable * _Nonnull argv, int argc);
4141

0 commit comments

Comments
 (0)