@@ -91,9 +91,10 @@ AsyncContextLayout irgen::getAsyncContextLayout(IRGenModule &IGM,
91
91
return layout;
92
92
}
93
93
94
- AsyncContextLayout irgen::getAsyncContextLayout (
95
- IRGenModule &IGM, CanSILFunctionType originalType,
96
- CanSILFunctionType substitutedType, SubstitutionMap substitutionMap) {
94
+ AsyncContextLayout
95
+ irgen::getAsyncContextLayout (IRGenModule &IGM, CanSILFunctionType originalType,
96
+ CanSILFunctionType substitutedType,
97
+ SubstitutionMap substitutionMap) {
97
98
SmallVector<const TypeInfo *, 4 > typeInfos;
98
99
SmallVector<SILType, 4 > valTypes;
99
100
SmallVector<AsyncContextLayout::ArgumentInfo, 4 > paramInfos;
@@ -158,8 +159,8 @@ AsyncContextLayout irgen::getAsyncContextLayout(
158
159
// IndirectResultTypes *indirectResults...;
159
160
auto indirectResults = fnConv.getIndirectSILResults ();
160
161
for (auto indirectResult : indirectResults) {
161
- auto ty = fnConv. getSILType (indirectResult,
162
- IGM.getMaximalTypeExpansionContext ());
162
+ auto ty =
163
+ fnConv. getSILType (indirectResult, IGM.getMaximalTypeExpansionContext ());
163
164
auto retLoweringTy = CanInOutType::get (ty.getASTType ());
164
165
auto &ti = IGM.getTypeInfoForLowered (retLoweringTy);
165
166
valTypes.push_back (ty);
@@ -177,8 +178,7 @@ AsyncContextLayout irgen::getAsyncContextLayout(
177
178
addExecutor ();
178
179
// YieldTypes yieldValues...
179
180
for (auto yield : fnConv.getYields ()) {
180
- auto ty =
181
- fnConv.getSILType (yield, IGM.getMaximalTypeExpansionContext ());
181
+ auto ty = fnConv.getSILType (yield, IGM.getMaximalTypeExpansionContext ());
182
182
auto &ti = IGM.getTypeInfoForLowered (ty.getASTType ());
183
183
valTypes.push_back (ty);
184
184
typeInfos.push_back (&ti);
@@ -187,8 +187,7 @@ AsyncContextLayout irgen::getAsyncContextLayout(
187
187
} else {
188
188
// ResultTypes directResults...;
189
189
for (auto result : fnConv.getDirectSILResults ()) {
190
- auto ty =
191
- fnConv.getSILType (result, IGM.getMaximalTypeExpansionContext ());
190
+ auto ty = fnConv.getSILType (result, IGM.getMaximalTypeExpansionContext ());
192
191
auto &ti = IGM.getTypeInfoForLowered (ty.getASTType ());
193
192
valTypes.push_back (ty);
194
193
typeInfos.push_back (&ti);
@@ -208,8 +207,8 @@ AsyncContextLayout irgen::getAsyncContextLayout(
208
207
209
208
// ArgTypes formalArguments...;
210
209
for (auto parameter : parameters) {
211
- SILType ty = IGM.silConv .getSILType (
212
- parameter, substitutedType, IGM.getMaximalTypeExpansionContext ());
210
+ SILType ty = IGM.silConv .getSILType (parameter, substitutedType,
211
+ IGM.getMaximalTypeExpansionContext ());
213
212
214
213
auto argumentLoweringType =
215
214
getArgumentLoweringType (ty.getASTType (), parameter,
@@ -225,8 +224,8 @@ AsyncContextLayout irgen::getAsyncContextLayout(
225
224
IGM, originalType, substitutionMap);
226
225
if (!bindings.empty ()) {
227
226
auto bindingsSize = bindings.getBufferSize (IGM);
228
- auto &bindingsTI = IGM. getOpaqueStorageTypeInfo (
229
- bindingsSize, IGM.getPointerAlignment ());
227
+ auto &bindingsTI =
228
+ IGM. getOpaqueStorageTypeInfo ( bindingsSize, IGM.getPointerAlignment ());
230
229
valTypes.push_back (SILType ());
231
230
typeInfos.push_back (&bindingsTI);
232
231
}
@@ -236,7 +235,7 @@ AsyncContextLayout irgen::getAsyncContextLayout(
236
235
if (hasLocalContextParameter) {
237
236
SILType ty =
238
237
IGM.silConv .getSILType (localContextParameter, substitutedType,
239
- IGM.getMaximalTypeExpansionContext ());
238
+ IGM.getMaximalTypeExpansionContext ());
240
239
auto argumentLoweringType =
241
240
getArgumentLoweringType (ty.getASTType (), localContextParameter,
242
241
/* isNoEscape*/ true );
@@ -278,19 +277,19 @@ AsyncContextLayout irgen::getAsyncContextLayout(
278
277
trailingWitnessInfo = AsyncContextLayout::TrailingWitnessInfo ();
279
278
}
280
279
281
- return AsyncContextLayout (
282
- IGM, LayoutStrategy::Optimal, valTypes, typeInfos, originalType ,
283
- substitutedType, substitutionMap, std::move (bindings),
284
- trailingWitnessInfo, errorType, canHaveValidError, paramInfos,
285
- isCoroutine, yieldInfos, indirectReturnInfos, directReturnInfos,
286
- localContextInfo);
280
+ return AsyncContextLayout (IGM, LayoutStrategy::Optimal, valTypes, typeInfos,
281
+ originalType, substitutedType, substitutionMap ,
282
+ std::move (bindings), trailingWitnessInfo, errorType ,
283
+ canHaveValidError, paramInfos, isCoroutine ,
284
+ yieldInfos, indirectReturnInfos, directReturnInfos,
285
+ localContextInfo);
287
286
}
288
287
289
288
AsyncContextLayout::AsyncContextLayout (
290
289
IRGenModule &IGM, LayoutStrategy strategy, ArrayRef<SILType> fieldTypes,
291
- ArrayRef<const TypeInfo *> fieldTypeInfos,
292
- CanSILFunctionType originalType, CanSILFunctionType substitutedType ,
293
- SubstitutionMap substitutionMap, NecessaryBindings &&bindings,
290
+ ArrayRef<const TypeInfo *> fieldTypeInfos, CanSILFunctionType originalType,
291
+ CanSILFunctionType substitutedType, SubstitutionMap substitutionMap ,
292
+ NecessaryBindings &&bindings,
294
293
Optional<TrailingWitnessInfo> trailingWitnessInfo, SILType errorType,
295
294
bool canHaveValidError, ArrayRef<ArgumentInfo> argumentInfos,
296
295
bool isCoroutine, ArrayRef<SILYieldInfo> yieldInfos,
0 commit comments