You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SILGen] Handled foreign funcs with async, error, and more. (#39960)
In 1ae317d, all the machinery was added
to enable calling ObjC functions that have both async and error
conventions. The handling that was added for matching up arguments and
parameters, however, failed to handle functions that had both foreign
async and foreign error and other arguments. Here, that handling is
fixed.
The fix is in four parts:
- Reverting to a single call to CallSite::emit to emit the formal
params. At this point, the foreign async and/or error params will be
claimed as well.
- Separately counting the async and error parameters in
ParamLowering::claimParams to ensure we get the right parameter
slices.
- Letting ArgEmitter::maybeEmitForeignArgument look for an error
parameter even if it already found an async parameter.
- Letting ArgEmitter::maybeEmitForeignArgument keep looking for foreign
arguments after it finds one.
rdar://80704984
0 commit comments