mirror of
https://github.com/apple/swift.git
synced 2026-10-04 11:58:22 +02:00
Mark the generated wrappers @inline(always), and build the bounds check failure message in a local @inline(never) function. The wrappers are thin shims around the unsafe call, but several of them were not inlined, adding a call per invocation, and the interpolated fatalError message put stack frame setup on the fast path. The message itself is built by a nested function that takes the wrapper's name as an argument, so that it is the same in every wrapper and can be merged in optimized builds.