We've been increasingly running into issues with availability markup
in the library lately. In particular, the fact that strict availability
markup causes functions to act as-if they were deleted breaks the library
in various ways, making it impossible AFAICT to enable availability markup
for PMR. It also causes a lot of spurious diagnostics in e.g. <format>,
as can be seen by the multiple TODO comments removed in this patch.
This patch uses non-strict availability markup instead, which is used
much more widely on Apple platforms. The difference is that using an
unavailable API will trigger a warning instead of an error, and that
using an unavailable API will cause a weak-definition to be emitted
(so it is possible to check at runtime whether the API is available).
This should resolve several difficulties we've been having with availability
markup, which I believe to have tracked down to fundamental implementation
constraints with the strict version of availability. In other words,
strict has some properties which are fundamentally undesirable for us,
and it was always possible to work around them but it isn't anymore.
This will also make it possible for users to branch on whether an API
is available at runtime, which has been requested by users.
As a follow-up to this patch, I should be able to clean up even more
availability workarounds in the library.
rdar://100138498
I like this change :-)