mirror of
https://github.com/apple/swift.git
synced 2026-11-01 23:11:50 +01:00
When a `@backDeployed` function, accessor, or initializer is used as the witness for a protocol requirement, the protocol witness thunk must call the declaration through its back deployment thunk under the same conditions as a direct call does. Otherwise, the witness thunk references the ABI implementation of the declaration directly, which may not be available at runtime on older OSes. Factor the logic that decides whether a reference to a declaration must go through a back deployment thunk into a shared helper so that direct calls and protocol witness thunks make the same decision. Resolves rdar://172458196.