This attribute was introduced in
7eca38ce76d5d1915f4ab7e665964062c0b37697 (llvm-project).
Match it using a wildcard regex, since it is not relevant to these
tests.
This is intended to reduce future conflicts with rebranch.
Mangling uses a generic signature is used to shorten member types
to just a name where the protocol is unambiguous.
Unfortunately, in the particular case of 'associated type paths',
the IRGen mangler did not consistently set the right signature.
Sometimes, it would use no signature, and other times it would use
the signature of the concrete conforming type, which is incorrect
because the member type is written relative to the root protocol's
generic signature, <Self : P>.
This was caught by some new assertions I'm adding to the rewrite
system.
Note that this changes the mangling of a few symbols, but none
are public in the ABI.
Now that the runtime fills in the private slots with conditional requirement
information, we can always use mangled names for inherited conformances.
Fixes rdar://problem/46282080.
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.
This includes global generic and non-generic global access
functions, protocol associated type access functions,
swift_getGenericMetadata, and generic type completion functions.
The main part of this change is that the functions now need to take
a MetadataRequest and return a MetadataResponse, which is capable
of expressing that the request can fail. The state of the returned
metadata is reported as an second, independent return value; this
allows the caller to easily check the possibility of failure without
having to mask it out from the returned metadata pointer, as well
as allowing it to be easily ignored.
Also, change metadata access functions to use swiftcc to ensure that
this return value is indeed returned in two separate registers.
Also, change protocol associated conformance access functions to use
swiftcc. This isn't really related, but for some reason it snuck in.
Since it's clearly the right thing to do, and since I really didn't
want to retroactively tease that back out from all the rest of the
test changes, I've left it in.
Also, change generic metadata access functions to either pass all
the generic arguments directly or pass them all indirectly. I don't
know how we ended up with the hybrid approach. I needed to change all
the code-generation and calls here anyway in order to pass the request
parameter, and I figured I might as well change the ABI to something
sensible.
The count of the number of witness tables was designed to be an
assertion/check that we've hooked up all the infrastructure
correctly. Everything is now implemented, and the assertion has never
triggered, so it can be removed, saving some work.
Fixes rdar://problem/38038928.
Extend witness tables with a pointer to the protocol conformance
descriptor from which the witness table was generated. This will allow
us to determine (for example) whether two witness tables were
generated from the same (or equivalent) conformances in the future, as
well as discover more information about the witness table itself.
Fixes rdar://problem/36287959.
A witness table instantiation function can end up referring to
conditional requirements to, e.g., fill in base witness tables. Store
the conditional requirements first, and also bind the witness tables
for conditional requirements within the local scope so they can be
used directly. Fixes SR-6478.
When emitting a witness table accessor (e.g., an associated type metadata
or associated type conformance accessor) for a conditional conformance,
bind the conditional requirements so we can refer to them within that
accessor. Witness methods get this behavior already through the SelfWitnessTable parameter, but everything the witness table needs it.
Fixes most of SR-6478.