@@ -110,78 +110,78 @@ public func createTestSmallStruct(_ x: UInt32) -> TestSmallStruct {
110
110
111
111
// Skip templates in impl classes.
112
112
// CHECK: _impl_TestSmallStruct
113
- // CHECK: template<class T >
114
- // CHECK-NEXT: requires swift::isUsableInGenericContext<T >
115
- // CHECK-NEXT: inline T genericMethodPassThrough(const T & x) const;
116
- // CHECK-NEXT: template<class T >
117
- // CHECK-NEXT: requires swift::isUsableInGenericContext<T >
118
- // CHECK-NEXT: inline void genericMethodMutTake(const T & x);
113
+ // CHECK: template<class T_0_0 >
114
+ // CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0 >
115
+ // CHECK-NEXT: inline T_0_0 genericMethodPassThrough(const T_0_0 & x) const;
116
+ // CHECK-NEXT: template<class T_0_0 >
117
+ // CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0 >
118
+ // CHECK-NEXT: inline void genericMethodMutTake(const T_0_0 & x);
119
119
// CHECK: template<class T>
120
120
// CHECK-NEXT: returnNewValue
121
121
122
- // CHECK: template<class T >
123
- // CHECK-NEXT: requires swift::isUsableInGenericContext<T >
124
- // CHECK-NEXT: inline void genericPrintFunction(const T & x) noexcept {
125
- // CHECK-NEXT: return _impl::$s9Functions20genericPrintFunctionyyxlF(swift::_impl::getOpaquePointer(x), swift::getTypeMetadata<T >());
122
+ // CHECK: template<class T_0_0 >
123
+ // CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0 >
124
+ // CHECK-NEXT: inline void genericPrintFunction(const T_0_0 & x) noexcept {
125
+ // CHECK-NEXT: return _impl::$s9Functions20genericPrintFunctionyyxlF(swift::_impl::getOpaquePointer(x), swift::getTypeMetadata<T_0_0 >());
126
126
// CHECK-NEXT: }
127
127
128
128
129
- // CHECK: template<class T1 , class T2 >
130
- // CHECK-NEXT: requires swift::isUsableInGenericContext<T1 > && swift::isUsableInGenericContext<T2 >
131
- // CHECK-NEXT: inline void genericPrintFunctionMultiGeneric(swift::Int x, const T1 & t1, const T1 & t1p, swift::Int y, const T2 & t2) noexcept {
132
- // CHECK-NEXT: return _impl::$s9Functions32genericPrintFunctionMultiGenericyySi_xxSiq_tr0_lF(x, swift::_impl::getOpaquePointer(t1), swift::_impl::getOpaquePointer(t1p), y, swift::_impl::getOpaquePointer(t2), swift::getTypeMetadata<T1 >(), swift::getTypeMetadata<T2 >());
129
+ // CHECK: template<class T_0_0 , class T_0_1 >
130
+ // CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0 > && swift::isUsableInGenericContext<T_0_1 >
131
+ // CHECK-NEXT: inline void genericPrintFunctionMultiGeneric(swift::Int x, const T_0_0 & t1, const T_0_0 & t1p, swift::Int y, const T_0_1 & t2) noexcept {
132
+ // CHECK-NEXT: return _impl::$s9Functions32genericPrintFunctionMultiGenericyySi_xxSiq_tr0_lF(x, swift::_impl::getOpaquePointer(t1), swift::_impl::getOpaquePointer(t1p), y, swift::_impl::getOpaquePointer(t2), swift::getTypeMetadata<T_0_0 >(), swift::getTypeMetadata<T_0_1 >());
133
133
// CHECK-NEXT: }
134
134
135
135
136
- // CHECK: template<class T >
137
- // CHECK-NEXT: requires swift::isUsableInGenericContext<T >
138
- // CHECK-NEXT: inline void genericPrintFunctionTwoArg(const T & x, swift::Int y) noexcept {
139
- // CHECK-NEXT: return _impl::$s9Functions26genericPrintFunctionTwoArgyyx_SitlF(swift::_impl::getOpaquePointer(x), y, swift::getTypeMetadata<T >());
136
+ // CHECK: template<class T_0_0 >
137
+ // CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0 >
138
+ // CHECK-NEXT: inline void genericPrintFunctionTwoArg(const T_0_0 & x, swift::Int y) noexcept {
139
+ // CHECK-NEXT: return _impl::$s9Functions26genericPrintFunctionTwoArgyyx_SitlF(swift::_impl::getOpaquePointer(x), y, swift::getTypeMetadata<T_0_0 >());
140
140
// CHECK-NEXT: }
141
141
142
- // CHECK: template<class T >
143
- // CHECK-NEXT: requires swift::isUsableInGenericContext<T >
144
- // CHECK-NEXT: inline T genericRet(const T & x) noexcept SWIFT_WARN_UNUSED_RESULT {
145
- // CHECK-NEXT: if constexpr (std::is_base_of<::swift::_impl::RefCountedClass, T >::value) {
142
+ // CHECK: template<class T_0_0 >
143
+ // CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0 >
144
+ // CHECK-NEXT: inline T_0_0 genericRet(const T_0_0 & x) noexcept SWIFT_WARN_UNUSED_RESULT {
145
+ // CHECK-NEXT: if constexpr (std::is_base_of<::swift::_impl::RefCountedClass, T_0_0 >::value) {
146
146
// CHECK-NEXT: void *returnValue;
147
- // CHECK-NEXT: _impl::$s9Functions10genericRetyxxlF(reinterpret_cast<void *>(&returnValue), swift::_impl::getOpaquePointer(x), swift::getTypeMetadata<T >());
148
- // CHECK-NEXT: return ::swift::_impl::implClassFor<T >::type::makeRetained(returnValue);
149
- // CHECK-NEXT: } else if constexpr (::swift::_impl::isValueType<T >) {
150
- // CHECK-NEXT: return ::swift::_impl::implClassFor<T >::type::returnNewValue([&](void * _Nonnull returnValue) {
151
- // CHECK-NEXT: _impl::$s9Functions10genericRetyxxlF(returnValue, swift::_impl::getOpaquePointer(x), swift::getTypeMetadata<T >());
147
+ // CHECK-NEXT: _impl::$s9Functions10genericRetyxxlF(reinterpret_cast<void *>(&returnValue), swift::_impl::getOpaquePointer(x), swift::getTypeMetadata<T_0_0 >());
148
+ // CHECK-NEXT: return ::swift::_impl::implClassFor<T_0_0 >::type::makeRetained(returnValue);
149
+ // CHECK-NEXT: } else if constexpr (::swift::_impl::isValueType<T_0_0 >) {
150
+ // CHECK-NEXT: return ::swift::_impl::implClassFor<T_0_0 >::type::returnNewValue([&](void * _Nonnull returnValue) {
151
+ // CHECK-NEXT: _impl::$s9Functions10genericRetyxxlF(returnValue, swift::_impl::getOpaquePointer(x), swift::getTypeMetadata<T_0_0 >());
152
152
// CHECK-NEXT: });
153
153
// CHECK-NEXT: } else {
154
- // CHECK-NEXT: T returnValue;
155
- // CHECK-NEXT: _impl::$s9Functions10genericRetyxxlF(reinterpret_cast<void *>(&returnValue), swift::_impl::getOpaquePointer(x), swift::getTypeMetadata<T >());
154
+ // CHECK-NEXT: T_0_0 returnValue;
155
+ // CHECK-NEXT: _impl::$s9Functions10genericRetyxxlF(reinterpret_cast<void *>(&returnValue), swift::_impl::getOpaquePointer(x), swift::getTypeMetadata<T_0_0 >());
156
156
// CHECK-NEXT: return returnValue;
157
157
// CHECK-NEXT: }
158
158
// CHECK-NEXT: }
159
159
160
- // CHECK: template<class T >
161
- // CHECK-NEXT: requires swift::isUsableInGenericContext<T >
162
- // CHECK-NEXT: inline void genericSwap(T & x, T & y) noexcept {
163
- // CHECK-NEXT: return _impl::$s9Functions11genericSwapyyxz_xztlF(swift::_impl::getOpaquePointer(x), swift::_impl::getOpaquePointer(y), swift::getTypeMetadata<T >());
160
+ // CHECK: template<class T_0_0 >
161
+ // CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0 >
162
+ // CHECK-NEXT: inline void genericSwap(T_0_0 & x, T_0_0 & y) noexcept {
163
+ // CHECK-NEXT: return _impl::$s9Functions11genericSwapyyxz_xztlF(swift::_impl::getOpaquePointer(x), swift::_impl::getOpaquePointer(y), swift::getTypeMetadata<T_0_0 >());
164
164
// CHECK-NEXT: }
165
165
166
- // CHECK: template<class T >
167
- // CHECK-NEXT: requires swift::isUsableInGenericContext<T >
168
- // CHECK-NEXT: inline T TestSmallStruct::genericMethodPassThrough(const T & x) const {
169
- // CHECK-NEXT: if constexpr (std::is_base_of<::swift::_impl::RefCountedClass, T >::value) {
166
+ // CHECK: template<class T_0_0 >
167
+ // CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0 >
168
+ // CHECK-NEXT: inline T_0_0 TestSmallStruct::genericMethodPassThrough(const T_0_0 & x) const {
169
+ // CHECK-NEXT: if constexpr (std::is_base_of<::swift::_impl::RefCountedClass, T_0_0 >::value) {
170
170
// CHECK-NEXT: void *returnValue;
171
- // CHECK-NEXT: _impl::$s9Functions15TestSmallStructV24genericMethodPassThroughyxxlF(reinterpret_cast<void *>(&returnValue), swift::_impl::getOpaquePointer(x), _impl::swift_interop_passDirect_Functions_TestSmallStruct(_getOpaquePointer()), swift::getTypeMetadata<T >());
172
- // CHECK-NEXT: return ::swift::_impl::implClassFor<T >::type::makeRetained(returnValue);
173
- // CHECK-NEXT: } else if constexpr (::swift::_impl::isValueType<T >) {
174
- // CHECK-NEXT: return ::swift::_impl::implClassFor<T >::type::returnNewValue([&](void * _Nonnull returnValue) {
175
- // CHECK-NEXT: _impl::$s9Functions15TestSmallStructV24genericMethodPassThroughyxxlF(returnValue, swift::_impl::getOpaquePointer(x), _impl::swift_interop_passDirect_Functions_TestSmallStruct(_getOpaquePointer()), swift::getTypeMetadata<T >());
171
+ // CHECK-NEXT: _impl::$s9Functions15TestSmallStructV24genericMethodPassThroughyxxlF(reinterpret_cast<void *>(&returnValue), swift::_impl::getOpaquePointer(x), _impl::swift_interop_passDirect_Functions_TestSmallStruct(_getOpaquePointer()), swift::getTypeMetadata<T_0_0 >());
172
+ // CHECK-NEXT: return ::swift::_impl::implClassFor<T_0_0 >::type::makeRetained(returnValue);
173
+ // CHECK-NEXT: } else if constexpr (::swift::_impl::isValueType<T_0_0 >) {
174
+ // CHECK-NEXT: return ::swift::_impl::implClassFor<T_0_0 >::type::returnNewValue([&](void * _Nonnull returnValue) {
175
+ // CHECK-NEXT: _impl::$s9Functions15TestSmallStructV24genericMethodPassThroughyxxlF(returnValue, swift::_impl::getOpaquePointer(x), _impl::swift_interop_passDirect_Functions_TestSmallStruct(_getOpaquePointer()), swift::getTypeMetadata<T_0_0 >());
176
176
// CHECK-NEXT: });
177
177
// CHECK-NEXT: } else {
178
- // CHECK-NEXT: T returnValue;
179
- // CHECK-NEXT: _impl::$s9Functions15TestSmallStructV24genericMethodPassThroughyxxlF(reinterpret_cast<void *>(&returnValue), swift::_impl::getOpaquePointer(x), _impl::swift_interop_passDirect_Functions_TestSmallStruct(_getOpaquePointer()), swift::getTypeMetadata<T >());
178
+ // CHECK-NEXT: T_0_0 returnValue;
179
+ // CHECK-NEXT: _impl::$s9Functions15TestSmallStructV24genericMethodPassThroughyxxlF(reinterpret_cast<void *>(&returnValue), swift::_impl::getOpaquePointer(x), _impl::swift_interop_passDirect_Functions_TestSmallStruct(_getOpaquePointer()), swift::getTypeMetadata<T_0_0 >());
180
180
// CHECK-NEXT: return returnValue;
181
181
// CHECK-NEXT: }
182
182
// CHECK-NEXT: }
183
- // CHECK-NEXT: template<class T >
184
- // CHECK-NEXT: requires swift::isUsableInGenericContext<T >
185
- // CHECK-NEXT: inline void TestSmallStruct::genericMethodMutTake(const T & x) {
186
- // CHECK-NEXT: return _impl::$s9Functions15TestSmallStructV20genericMethodMutTakeyyxlF(swift::_impl::getOpaquePointer(x), swift::getTypeMetadata<T >(), _getOpaquePointer());
183
+ // CHECK-NEXT: template<class T_0_0 >
184
+ // CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0 >
185
+ // CHECK-NEXT: inline void TestSmallStruct::genericMethodMutTake(const T_0_0 & x) {
186
+ // CHECK-NEXT: return _impl::$s9Functions15TestSmallStructV20genericMethodMutTakeyyxlF(swift::_impl::getOpaquePointer(x), swift::getTypeMetadata<T_0_0 >(), _getOpaquePointer());
187
187
// CHECK-NEXT: }
0 commit comments