Clang infers framework autolink hints when parsing a modulemap. In order to do
so, it checks if the module is a framework and if there is a framework binary
or TBD file in the SDK. Only when Clang finds the filei, then the autolink hint
is added to the module metadata.
During a project build many clang processes perform this check, which causes
many stat calls - even for modules/frameworks that are not even used.
The linker is already resilient to non-existing framework links that come from
the autolink metadata, so there is no need for Clang to do this check.
Instead the autolink hints are now added unconditionally and the linker only
needs to do the check once. This reduces the overall number of stat calls.
This fixes rdar://106578342.