When we’re creating an associated type witness metadata accessor for
resilience reasons, but the associated type witness doesn’t involve any
type parameters, directly form the type metadata reference (and don’t
cache it).
While here… update all of the IRGen/SILGen test cases perturbed by the
introduction of resilient associated type access patterns.
The SILGen testsuite consists of valid Swift code covering most language
features. We use these tests to verify that no unknown nodes are in the
file's libSyntax tree. That way we will (hopefully) catch any future
changes or additions to the language which are not implemented in
libSyntax.
There's no need for any of the declarations here to be public.
With some other changes I'm working on, there was a problem
where the test output would change if the standard library was
built without -sil-serialize-all.
When we're determining which protocols an associated type conforms to,
look for same-named associated types in inherited protocols and add
their conformances to the set of protocols to which this associated
type conforms. Coupled with an embarrassing fix to the
protocol-minimization code, this should eliminate the dreaded SILGen
assertion about the number of conformances not matching the number of
protocols when generating witness table entries for associated type
witnesses. Fixes rdar://problem/21599502.
Swift SVN r29976