@@ -19,7 +19,7 @@ extension std.string {
19
19
///
20
20
/// - Complexity: O(*n*), where *n* is the number of UTF-8 code units in the
21
21
/// Swift string.
22
- @inlinable
22
+ @_alwaysEmitIntoClient
23
23
public init ( _ string: String ) {
24
24
self = string. withCString ( encodedAs: UTF8 . self) { buffer in
25
25
#if os(Windows)
@@ -33,7 +33,7 @@ extension std.string {
33
33
}
34
34
}
35
35
36
- @inlinable
36
+ @_alwaysEmitIntoClient
37
37
public init ( _ string: UnsafePointer < CChar > ? ) {
38
38
if let str = string {
39
39
#if os(Windows)
@@ -56,7 +56,7 @@ extension std.u16string {
56
56
///
57
57
/// - Complexity: O(*n*), where *n* is the number of UTF-16 code units in the
58
58
/// Swift string.
59
- @inlinable
59
+ @_alwaysEmitIntoClient
60
60
public init ( _ string: String ) {
61
61
self . init ( )
62
62
for char in string. utf16 {
@@ -71,7 +71,7 @@ extension std.u32string {
71
71
///
72
72
/// - Complexity: O(*n*), where *n* is the number of UTF-32 code units in the
73
73
/// Swift string.
74
- @inlinable
74
+ @_alwaysEmitIntoClient
75
75
public init ( _ string: String ) {
76
76
self . init ( )
77
77
for char in string. unicodeScalars {
@@ -83,21 +83,21 @@ extension std.u32string {
83
83
// MARK: Initializing C++ string from a Swift String literal
84
84
85
85
extension std . string : ExpressibleByStringLiteral {
86
- @inlinable
86
+ @_alwaysEmitIntoClient
87
87
public init ( stringLiteral value: String ) {
88
88
self . init ( value)
89
89
}
90
90
}
91
91
92
92
extension std . u16string : ExpressibleByStringLiteral {
93
- @inlinable
93
+ @_alwaysEmitIntoClient
94
94
public init ( stringLiteral value: String ) {
95
95
self . init ( value)
96
96
}
97
97
}
98
98
99
99
extension std . u32string : ExpressibleByStringLiteral {
100
- @inlinable
100
+ @_alwaysEmitIntoClient
101
101
public init ( stringLiteral value: String ) {
102
102
self . init ( value)
103
103
}
@@ -106,27 +106,27 @@ extension std.u32string: ExpressibleByStringLiteral {
106
106
// MARK: Concatenating and comparing C++ strings
107
107
108
108
extension std . string : Equatable , Comparable {
109
- @inlinable
109
+ @_alwaysEmitIntoClient
110
110
public static func == ( lhs: std . string , rhs: std . string ) -> Bool {
111
111
return lhs. compare ( rhs) == 0
112
112
}
113
113
114
- @inlinable
114
+ @_alwaysEmitIntoClient
115
115
public static func < ( lhs: std . string , rhs: std . string ) -> Bool {
116
116
return lhs. compare ( rhs) < 0
117
117
}
118
118
119
- @inlinable
119
+ @_alwaysEmitIntoClient
120
120
public static func += ( lhs: inout std . string , rhs: std . string ) {
121
121
lhs. append ( rhs)
122
122
}
123
123
124
- @inlinable
124
+ @_alwaysEmitIntoClient
125
125
public mutating func append( _ other: std . string ) {
126
126
__appendUnsafe ( other) // ignore the returned pointer
127
127
}
128
128
129
- @inlinable
129
+ @_alwaysEmitIntoClient
130
130
public static func + ( lhs: std . string , rhs: std . string ) -> std . string {
131
131
var copy = lhs
132
132
copy += rhs
@@ -135,27 +135,27 @@ extension std.string: Equatable, Comparable {
135
135
}
136
136
137
137
extension std . u16string : Equatable , Comparable {
138
- @inlinable
138
+ @_alwaysEmitIntoClient
139
139
public static func == ( lhs: std . u16string , rhs: std . u16string ) -> Bool {
140
140
return lhs. compare ( rhs) == 0
141
141
}
142
142
143
- @inlinable
143
+ @_alwaysEmitIntoClient
144
144
public static func < ( lhs: std . u16string , rhs: std . u16string ) -> Bool {
145
145
return lhs. compare ( rhs) < 0
146
146
}
147
147
148
- @inlinable
148
+ @_alwaysEmitIntoClient
149
149
public static func += ( lhs: inout std . u16string , rhs: std . u16string ) {
150
150
lhs. append ( rhs)
151
151
}
152
152
153
- @inlinable
153
+ @_alwaysEmitIntoClient
154
154
public mutating func append( _ other: std . u16string ) {
155
155
__appendUnsafe ( other) // ignore the returned pointer
156
156
}
157
157
158
- @inlinable
158
+ @_alwaysEmitIntoClient
159
159
public static func + ( lhs: std . u16string , rhs: std . u16string ) -> std . u16string {
160
160
var copy = lhs
161
161
copy += rhs
@@ -164,27 +164,27 @@ extension std.u16string: Equatable, Comparable {
164
164
}
165
165
166
166
extension std . u32string : Equatable , Comparable {
167
- @inlinable
167
+ @_alwaysEmitIntoClient
168
168
public static func == ( lhs: std . u32string , rhs: std . u32string ) -> Bool {
169
169
return lhs. compare ( rhs) == 0
170
170
}
171
171
172
- @inlinable
172
+ @_alwaysEmitIntoClient
173
173
public static func < ( lhs: std . u32string , rhs: std . u32string ) -> Bool {
174
174
return lhs. compare ( rhs) < 0
175
175
}
176
176
177
- @inlinable
177
+ @_alwaysEmitIntoClient
178
178
public static func += ( lhs: inout std . u32string , rhs: std . u32string ) {
179
179
lhs. append ( rhs)
180
180
}
181
181
182
- @inlinable
182
+ @_alwaysEmitIntoClient
183
183
public mutating func append( _ other: std . u32string ) {
184
184
__appendUnsafe ( other) // ignore the returned pointer
185
185
}
186
186
187
- @inlinable
187
+ @_alwaysEmitIntoClient
188
188
public static func + ( lhs: std . u32string , rhs: std . u32string ) -> std . u32string {
189
189
var copy = lhs
190
190
copy += rhs
@@ -195,7 +195,7 @@ extension std.u32string: Equatable, Comparable {
195
195
// MARK: Hashing C++ strings
196
196
197
197
extension std . string : Hashable {
198
- @inlinable
198
+ @_alwaysEmitIntoClient
199
199
public func hash( into hasher: inout Hasher ) {
200
200
// Call std::hash<std::string>::operator()
201
201
let cxxHash = __swift_interopHashOfString ( ) . callAsFunction ( self )
@@ -204,7 +204,7 @@ extension std.string: Hashable {
204
204
}
205
205
206
206
extension std . u16string : Hashable {
207
- @inlinable
207
+ @_alwaysEmitIntoClient
208
208
public func hash( into hasher: inout Hasher ) {
209
209
// Call std::hash<std::u16string>::operator()
210
210
let cxxHash = __swift_interopHashOfU16String ( ) . callAsFunction ( self )
@@ -213,7 +213,7 @@ extension std.u16string: Hashable {
213
213
}
214
214
215
215
extension std . u32string : Hashable {
216
- @inlinable
216
+ @_alwaysEmitIntoClient
217
217
public func hash( into hasher: inout Hasher ) {
218
218
// Call std::hash<std::u32string>::operator()
219
219
let cxxHash = __swift_interopHashOfU32String ( ) . callAsFunction ( self )
@@ -224,42 +224,42 @@ extension std.u32string: Hashable {
224
224
// MARK: Getting a Swift description of a C++ string
225
225
226
226
extension std . string : CustomDebugStringConvertible {
227
- @inlinable
227
+ @_alwaysEmitIntoClient
228
228
public var debugDescription : String {
229
229
return " std.string( \( String ( self ) ) ) "
230
230
}
231
231
}
232
232
233
233
extension std . u16string : CustomDebugStringConvertible {
234
- @inlinable
234
+ @_alwaysEmitIntoClient
235
235
public var debugDescription : String {
236
236
return " std.u16string( \( String ( self ) ) ) "
237
237
}
238
238
}
239
239
240
240
extension std . u32string : CustomDebugStringConvertible {
241
- @inlinable
241
+ @_alwaysEmitIntoClient
242
242
public var debugDescription : String {
243
243
return " std.u32string( \( String ( self ) ) ) "
244
244
}
245
245
}
246
246
247
247
extension std . string : CustomStringConvertible {
248
- @inlinable
248
+ @_alwaysEmitIntoClient
249
249
public var description : String {
250
250
return String ( self )
251
251
}
252
252
}
253
253
254
254
extension std . u16string : CustomStringConvertible {
255
- @inlinable
255
+ @_alwaysEmitIntoClient
256
256
public var description : String {
257
257
return String ( self )
258
258
}
259
259
}
260
260
261
261
extension std . u32string : CustomStringConvertible {
262
- @inlinable
262
+ @_alwaysEmitIntoClient
263
263
public var description : String {
264
264
return String ( self )
265
265
}
@@ -275,7 +275,7 @@ extension String {
275
275
/// (`"\u{FFFD}"`).
276
276
///
277
277
/// - Complexity: O(*n*), where *n* is the number of bytes in the C++ string.
278
- @inlinable
278
+ @_alwaysEmitIntoClient
279
279
public init ( _ cxxString: std . string ) {
280
280
let buffer = UnsafeBufferPointer < CChar > (
281
281
start: cxxString. __c_strUnsafe ( ) ,
@@ -294,7 +294,7 @@ extension String {
294
294
///
295
295
/// - Complexity: O(*n*), where *n* is the number of bytes in the C++ UTF-16
296
296
/// string.
297
- @inlinable
297
+ @_alwaysEmitIntoClient
298
298
public init ( _ cxxU16String: std . u16string ) {
299
299
let buffer = UnsafeBufferPointer < UInt16 > (
300
300
start: cxxU16String. __dataUnsafe ( ) ,
@@ -311,7 +311,7 @@ extension String {
311
311
///
312
312
/// - Complexity: O(*n*), where *n* is the number of bytes in the C++ UTF-32
313
313
/// string.
314
- @inlinable
314
+ @_alwaysEmitIntoClient
315
315
public init ( _ cxxU32String: std . u32string ) {
316
316
let buffer = UnsafeBufferPointer < Unicode . Scalar > (
317
317
start: cxxU32String. __dataUnsafe ( ) ,
@@ -334,7 +334,7 @@ extension String {
334
334
///
335
335
/// - Complexity: O(*n*), where *n* is the number of bytes in the C++ string
336
336
/// view.
337
- @inlinable
337
+ @_alwaysEmitIntoClient
338
338
public init ( _ cxxStringView: std . string_view ) {
339
339
let buffer = UnsafeBufferPointer < CChar > (
340
340
start: cxxStringView. __dataUnsafe ( ) ,
@@ -354,7 +354,7 @@ extension String {
354
354
///
355
355
/// - Complexity: O(*n*), where *n* is the number of bytes in the C++ UTF-16
356
356
/// string view.
357
- @inlinable
357
+ @_alwaysEmitIntoClient
358
358
public init ( _ cxxU16StringView: std . u16string_view ) {
359
359
let buffer = UnsafeBufferPointer < UInt16 > (
360
360
start: cxxU16StringView. __dataUnsafe ( ) ,
@@ -372,7 +372,7 @@ extension String {
372
372
///
373
373
/// - Complexity: O(*n*), where *n* is the number of bytes in the C++ UTF-32
374
374
/// string view.
375
- @inlinable
375
+ @_alwaysEmitIntoClient
376
376
public init ( _ cxxU32StringView: std . u32string_view ) {
377
377
let buffer = UnsafeBufferPointer < Unicode . Scalar > (
378
378
start: cxxU32StringView. __dataUnsafe ( ) ,
0 commit comments