swift
7cccbcc8 - [DiscardingTG] Remove reabstraction thunk for `() -> Void` to `() -> T` (#70537)

Commit
2 years ago
[DiscardingTG] Remove reabstraction thunk for `() -> Void` to `() -> T` (#70537) Concurrency runtime expects discarding task operation entrypoint function not to have result type, but the current SILGen implementation generates reabstraction thunk to convert `() -> Void` to `() -> T` for the operation function. Since the `T` is always `Void` for DiscardingTG, the mismatch of result type expectation does not cause any problem on most platforms, but the signature mismatch causes a problem on WebAssembly. This patch introduces new builtin operations for creating discarding task, which always takes `() -> Void` as the operation function type.
Parents
Loading