When we're not serializing SIL for all function bodies, @_transparent
functions can only reference internal functions that are declared
@_versioned, otherwise there's no serialized body and no public entry
point, so any client that inlines the @_transparent function will
not be able to link.
This patch adds the minimum set of @_versioned declarations to allow
a non-optimized build of the standard library and overlays.
Recall that this attribute is just a temporary hack to make progress
on building the standard library with resilience enabled.
Once availability and resilience learn about each other, @_versioned
will be replaced by having an availability annotation on an internal
declaration. Invariants will be diagnosed by Sema instead of asserting
in the SIL verifier.
Finally, the set of "internal but available" declarations will
eventually be audited instead of determined by experimentation.
This almost closes out https://bugs.swift.org/browse/SR-267.
The remaining issue is an interaction between SIL optimizations and
serialization that will be fixed with some upcoming changes to the
optimizer.
The standard library has grown significantly, and we need a new
directory structure that clearly reflects the role of the APIs, and
allows future growth.
See stdlib/{public,internal,private}/README.txt for more information.
Swift SVN r25876