@@ -201,19 +201,25 @@ public func inoutConcretePair(_ x: UInt16, _ y: inout GenericPair<UInt16, UInt16
201
201
// CHECK-NEXT: SWIFT_EXTERN void $s8Generics15takeGenericPairyyAA0cD0Vyxq_Gr0_lF(const void * _Nonnull x, void * _Nonnull , void * _Nonnull ) SWIFT_NOEXCEPT SWIFT_CALL; // takeGenericPair(_:)
202
202
203
203
// CHECK: template<class T_0_0, class T_0_1>
204
+ // CHECK-NEXT: #ifdef __cpp_concepts
204
205
// CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0> && swift::isUsableInGenericContext<T_0_1>
206
+ // CHECK-NEXT: #endif
205
207
// CHECK-NEXT: class GenericPair;
206
208
207
209
// CHECK: template<class T_0_0, class T_0_1>
210
+ // CHECK-NEXT: #ifdef __cpp_concepts
208
211
// CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0> && swift::isUsableInGenericContext<T_0_1>
212
+ // CHECK-NEXT: #endif
209
213
// CHECK-NEXT: class _impl_GenericPair;
210
214
// CHECK-EMPTY:
211
215
// CHECK-NEXT: static_assert(2 <= 3, "unsupported generic requirement list for metadata func");
212
216
// CHECK-NEXT: // Type metadata accessor for GenericPair
213
217
// CHECK-NEXT: SWIFT_EXTERN swift::_impl::MetadataResponseTy $s8Generics11GenericPairVMa(swift::_impl::MetadataRequestTy, void * _Nonnull, void * _Nonnull) SWIFT_NOEXCEPT SWIFT_CALL;
214
218
215
219
// CHECK: template<class T_0_0, class T_0_1>
220
+ // CHECK-NEXT: #ifdef __cpp_concepts
216
221
// CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0> && swift::isUsableInGenericContext<T_0_1>
222
+ // CHECK-NEXT: #endif
217
223
// CHECK-NEXT: class GenericPair final {
218
224
// CHECK-NEXT: public:
219
225
// CHECK-NEXT: inline ~GenericPair() {
@@ -224,7 +230,9 @@ public func inoutConcretePair(_ x: UInt16, _ y: inout GenericPair<UInt16, UInt16
224
230
// CHECK-NEXT: }
225
231
226
232
// CHECK: template<class T_0_0, class T_0_1>
233
+ // CHECK-NEXT: #ifdef __cpp_concepts
227
234
// CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0> && swift::isUsableInGenericContext<T_0_1>
235
+ // CHECK-NEXT: #endif
228
236
// CHECK-NEXT: class _impl_GenericPair {
229
237
// CHECK-NEXT: public:
230
238
// CHECK-NEXT: static inline char * _Nonnull getOpaquePointer(GenericPair<T_0_0, T_0_1> &object) { return object._getOpaquePointer(); }
@@ -240,7 +248,9 @@ public func inoutConcretePair(_ x: UInt16, _ y: inout GenericPair<UInt16, UInt16
240
248
// CHECK-NEXT: #pragma clang diagnostic push
241
249
// CHECK-NEXT: #pragma clang diagnostic ignored "-Wc++17-extensions"
242
250
// CHECK-NEXT: template<class T_0_0, class T_0_1>
251
+ // CHECK-NEXT: #ifdef __cpp_concepts
243
252
// CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0> && swift::isUsableInGenericContext<T_0_1>
253
+ // CHECK-NEXT: #endif
244
254
// CHECK-NEXT: struct TypeMetadataTrait<Generics::GenericPair<T_0_0, T_0_1>> {
245
255
// CHECK-NEXT: static inline void * _Nonnull getTypeMetadata() {
246
256
// CHECK-NEXT: return Generics::_impl::$s8Generics11GenericPairVMa(0, swift::TypeMetadataTrait<T_0_0>::getTypeMetadata(), swift::TypeMetadataTrait<T_0_1>::getTypeMetadata())._0;
@@ -256,13 +266,17 @@ public func inoutConcretePair(_ x: UInt16, _ y: inout GenericPair<UInt16, UInt16
256
266
// CHECK-NEXT: }
257
267
258
268
// CHECK: template<class T_0_0, class T_0_1>
269
+ // CHECK-NEXT: #ifdef __cpp_concepts
259
270
// CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0> && swift::isUsableInGenericContext<T_0_1>
271
+ // CHECK-NEXT: #endif
260
272
// CHECK-NEXT: inline void inoutGenericPair(GenericPair<T_0_0, T_0_1>& x, const T_0_0& y) noexcept {
261
273
// CHECK-NEXT: return _impl::$s8Generics16inoutGenericPairyyAA0cD0Vyxq_Gz_xtr0_lF(_impl::_impl_GenericPair<T_0_0, T_0_1>::getOpaquePointer(x), swift::_impl::getOpaquePointer(y), swift::TypeMetadataTrait<T_0_0>::getTypeMetadata(), swift::TypeMetadataTrait<T_0_1>::getTypeMetadata());
262
274
// CHECK-NEXT: }
263
275
264
276
// CHECK: template<class T_0_0, class T_0_1>
277
+ // CHECK-NEXT: #ifdef __cpp_concepts
265
278
// CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0> && swift::isUsableInGenericContext<T_0_1>
279
+ // CHECK-NEXT: #endif
266
280
// CHECK-NEXT: inline GenericPair<T_0_0, T_0_1> makeGenericPair(const T_0_0& x, const T_0_1& y) noexcept SWIFT_WARN_UNUSED_RESULT {
267
281
// CHECK-NEXT: return _impl::_impl_GenericPair<T_0_0, T_0_1>::returnNewValue([&](char * _Nonnull result) {
268
282
// CHECK-NEXT: _impl::$s8Generics15makeGenericPairyAA0cD0Vyxq_Gx_q_tr0_lF(result, swift::_impl::getOpaquePointer(x), swift::_impl::getOpaquePointer(y), swift::TypeMetadataTrait<T_0_0>::getTypeMetadata(), swift::TypeMetadataTrait<T_0_1>::getTypeMetadata());
@@ -276,7 +290,9 @@ public func inoutConcretePair(_ x: UInt16, _ y: inout GenericPair<UInt16, UInt16
276
290
// CHECK-NEXT: }
277
291
278
292
// CHECK: template<class T_0_0, class T_0_1>
293
+ // CHECK-NEXT: #ifdef __cpp_concepts
279
294
// CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0> && swift::isUsableInGenericContext<T_0_1>
295
+ // CHECK-NEXT: #endif
280
296
// CHECK-NEXT: inline GenericPair<T_0_0, T_0_1> passThroughGenericPair(const GenericPair<T_0_0, T_0_1>& x, const T_0_1& y) noexcept SWIFT_WARN_UNUSED_RESULT {
281
297
// CHECK-NEXT: return _impl::_impl_GenericPair<T_0_0, T_0_1>::returnNewValue([&](char * _Nonnull result) {
282
298
// CHECK-NEXT: _impl::$s8Generics22passThroughGenericPairyAA0dE0Vyxq_GAE_q_tr0_lF(result, _impl::_impl_GenericPair<T_0_0, T_0_1>::getOpaquePointer(x), swift::_impl::getOpaquePointer(y), swift::TypeMetadataTrait<T_0_0>::getTypeMetadata(), swift::TypeMetadataTrait<T_0_1>::getTypeMetadata());
@@ -288,13 +304,17 @@ public func inoutConcretePair(_ x: UInt16, _ y: inout GenericPair<UInt16, UInt16
288
304
// CHECK-NEXT: }
289
305
290
306
// CHECK: template<class T_0_0, class T_0_1>
307
+ // CHECK-NEXT: #ifdef __cpp_concepts
291
308
// CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0> && swift::isUsableInGenericContext<T_0_1>
309
+ // CHECK-NEXT: #endif
292
310
// CHECK-NEXT: inline void takeGenericPair(const GenericPair<T_0_0, T_0_1>& x) noexcept {
293
311
// CHECK-NEXT: return _impl::$s8Generics15takeGenericPairyyAA0cD0Vyxq_Gr0_lF(_impl::_impl_GenericPair<T_0_0, T_0_1>::getOpaquePointer(x), swift::TypeMetadataTrait<T_0_0>::getTypeMetadata(), swift::TypeMetadataTrait<T_0_1>::getTypeMetadata());
294
312
// CHECK-NEXT:}
295
313
296
314
// CHECK: template<class T_0_0, class T_0_1>
315
+ // CHECK-NEXT: #ifdef __cpp_concepts
297
316
// CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0> && swift::isUsableInGenericContext<T_0_1>
317
+ // CHECK-NEXT: #endif
298
318
// CHECK-NEXT: inline T_0_1 GenericPair<T_0_0, T_0_1>::getY() const {
299
319
// CHECK-NEXT: if constexpr (std::is_base_of<::swift::_impl::RefCountedClass, T_0_1>::value) {
300
320
// CHECK-NEXT: void *returnValue;
@@ -312,31 +332,43 @@ public func inoutConcretePair(_ x: UInt16, _ y: inout GenericPair<UInt16, UInt16
312
332
// CHECK-NEXT: }
313
333
// CHECK-NEXT: }
314
334
// CHECK-NEXT: template<class T_0_0, class T_0_1>
335
+ // CHECK-NEXT: #ifdef __cpp_concepts
315
336
// CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0> && swift::isUsableInGenericContext<T_0_1>
337
+ // CHECK-NEXT: #endif
316
338
// CHECK-NEXT: inline void GenericPair<T_0_0, T_0_1>::setY(const T_0_1& value) {
317
339
// CHECK-NEXT: return _impl::$s8Generics11GenericPairV1yq_vs(swift::_impl::getOpaquePointer(value), swift::TypeMetadataTrait<GenericPair<T_0_0, T_0_1>>::getTypeMetadata(), _getOpaquePointer());
318
340
// CHECK-NEXT: }
319
341
// CHECK-NEXT: template<class T_0_0, class T_0_1>
342
+ // CHECK-NEXT: #ifdef __cpp_concepts
320
343
// CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0> && swift::isUsableInGenericContext<T_0_1>
344
+ // CHECK-NEXT: #endif
321
345
// CHECK-NEXT: inline GenericPair<T_0_0, T_0_1> GenericPair<T_0_0, T_0_1>::init(const T_0_0& x, swift::Int i, const T_0_1& y) {
322
346
// CHECK-NEXT: return _impl::_impl_GenericPair<T_0_0, T_0_1>::returnNewValue([&](char * _Nonnull result) {
323
347
// CHECK-NEXT: _impl::$s8Generics11GenericPairVyACyxq_Gx_Siq_tcfC(result, swift::_impl::getOpaquePointer(x), i, swift::_impl::getOpaquePointer(y), swift::TypeMetadataTrait<T_0_0>::getTypeMetadata(), swift::TypeMetadataTrait<T_0_1>::getTypeMetadata());
324
348
// CHECK-NEXT: });
325
349
// CHECK-NEXT: }
326
350
// CHECK-NEXT: template<class T_0_0, class T_0_1>
351
+ // CHECK-NEXT: #ifdef __cpp_concepts
327
352
// CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0> && swift::isUsableInGenericContext<T_0_1>
353
+ // CHECK-NEXT: #endif
328
354
// CHECK-NEXT: inline void GenericPair<T_0_0, T_0_1>::method() const {
329
355
// CHECK-NEXT: return _impl::$s8Generics11GenericPairV6methodyyF(swift::TypeMetadataTrait<GenericPair<T_0_0, T_0_1>>::getTypeMetadata(), _getOpaquePointer());
330
356
// CHECK-NEXT: }
331
357
// CHECK-NEXT: template<class T_0_0, class T_0_1>
358
+ // CHECK-NEXT: #ifdef __cpp_concepts
332
359
// CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0> && swift::isUsableInGenericContext<T_0_1>
360
+ // CHECK-NEXT: #endif
333
361
// CHECK-NEXT: inline void GenericPair<T_0_0, T_0_1>::mutatingMethod(const GenericPair<T_0_1, T_0_0>& other) {
334
362
// CHECK-NEXT: return _impl::$s8Generics11GenericPairV14mutatingMethodyyACyq_xGF(_impl::_impl_GenericPair<T_0_1, T_0_0>::getOpaquePointer(other), swift::TypeMetadataTrait<GenericPair<T_0_0, T_0_1>>::getTypeMetadata(), _getOpaquePointer());
335
363
// CHECK-NEXT: }
336
364
// CHECK-NEXT: template<class T_0_0, class T_0_1>
365
+ // CHECK-NEXT: #ifdef __cpp_concepts
337
366
// CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0> && swift::isUsableInGenericContext<T_0_1>
367
+ // CHECK-NEXT: #endif
338
368
// CHECK-NEXT: template<class T_1_0>
369
+ // CHECK-NEXT: #ifdef __cpp_concepts
339
370
// CHECK-NEXT: requires swift::isUsableInGenericContext<T_1_0>
371
+ // CHECK-NEXT: #endif
340
372
// CHECK-NEXT: inline T_1_0 GenericPair<T_0_0, T_0_1>::genericMethod(const T_1_0& x, const T_0_1& y) const {
341
373
// CHECK-NEXT: if constexpr (std::is_base_of<::swift::_impl::RefCountedClass, T_1_0>::value) {
342
374
// CHECK-NEXT: void *returnValue;
@@ -354,7 +386,9 @@ public func inoutConcretePair(_ x: UInt16, _ y: inout GenericPair<UInt16, UInt16
354
386
// CHECK-NEXT: }
355
387
// CHECK-NEXT: }
356
388
// CHECK-NEXT: template<class T_0_0, class T_0_1>
389
+ // CHECK-NEXT: #ifdef __cpp_concepts
357
390
// CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0> && swift::isUsableInGenericContext<T_0_1>
391
+ // CHECK-NEXT: #endif
358
392
// CHECK-NEXT: inline swift::Int GenericPair<T_0_0, T_0_1>::getComputedProp() const {
359
393
// CHECK-NEXT: return _impl::$s8Generics11GenericPairV12computedPropSivg(swift::TypeMetadataTrait<GenericPair<T_0_0, T_0_1>>::getTypeMetadata(), _getOpaquePointer());
360
394
// CHECK-NEXT: }
0 commit comments