@@ -2518,18 +2518,21 @@ class DelayedArgument {
25182518 AbstractionPattern origResultType;
25192519 ClaimedParamsRef paramsToEmit;
25202520 SILFunctionTypeRepresentation functionRepresentation;
2521-
2521+ bool implicitlyAsync;
2522+
25222523 DefaultArgumentStorage (SILLocation loc,
25232524 ConcreteDeclRef defaultArgsOwner,
25242525 unsigned destIndex,
25252526 CanType resultType,
25262527 AbstractionPattern origResultType,
25272528 ClaimedParamsRef paramsToEmit,
2528- SILFunctionTypeRepresentation functionRepresentation)
2529+ SILFunctionTypeRepresentation functionRepresentation,
2530+ bool implicitlyAsync)
25292531 : loc(loc), defaultArgsOwner(defaultArgsOwner), destIndex(destIndex),
25302532 resultType (resultType), origResultType(origResultType),
25312533 paramsToEmit(paramsToEmit),
2532- functionRepresentation(functionRepresentation)
2534+ functionRepresentation(functionRepresentation),
2535+ implicitlyAsync(implicitlyAsync)
25332536 {}
25342537 };
25352538 struct BorrowedLValueStorage {
@@ -2656,13 +2659,15 @@ class DelayedArgument {
26562659 CanType resultType,
26572660 AbstractionPattern origResultType,
26582661 ClaimedParamsRef params,
2659- SILFunctionTypeRepresentation functionTypeRepresentation)
2662+ SILFunctionTypeRepresentation functionTypeRepresentation,
2663+ bool implicitlyAsync)
26602664 : Kind(DefaultArgument) {
26612665 Value.emplace <DefaultArgumentStorage>(Kind, loc, defaultArgsOwner,
26622666 destIndex,
26632667 resultType,
26642668 origResultType, params,
2665- functionTypeRepresentation);
2669+ functionTypeRepresentation,
2670+ implicitlyAsync);
26662671 }
26672672
26682673 DelayedArgument (DelayedArgument &&other)
@@ -3261,7 +3266,7 @@ class ArgEmitter {
32613266 defArg->getParamIndex (),
32623267 substParamType, origParamType,
32633268 claimNextParameters (numParams),
3264- Rep);
3269+ Rep, defArg-> isImplicitlyAsync () );
32653270 Args.push_back (ManagedValue ());
32663271
32673272 maybeEmitForeignArgument ();
@@ -4255,7 +4260,8 @@ void DelayedArgument::emitDefaultArgument(SILGenFunction &SGF,
42554260 auto value = SGF.emitApplyOfDefaultArgGenerator (info.loc ,
42564261 info.defaultArgsOwner ,
42574262 info.destIndex ,
4258- info.resultType );
4263+ info.resultType ,
4264+ info.implicitlyAsync );
42594265
42604266 SmallVector<ManagedValue, 4 > loweredArgs;
42614267 SmallVector<DelayedArgument, 4 > delayedArgs;
0 commit comments