mirror of
https://github.com/apple/swift.git
synced 2026-06-20 15:42:51 +02:00
b0fc8daa83
The new function swift_getCanonicalSpecializedMetadata takes a metadata request, a prespecialized non-canonical metadata, and a cache as its arguments. The idea of the function is either to bless the provided prespecialized metadata as canonical if there is not currently a canonical metadata record for the type it describes or else to return the actual canonical metadata. When called, the metadata cache checks for a preexisting entry for this metadata. If none is found, the passed-in prespecialized metadata is added to the cache. Otherwise, the metadata record found in the cache is returned. rdar://problem/56995359