mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This plugs a hole where we failed to recognize a CF type when it appeared as the payload of an enum stored as a property. Curiously, RemoteMirror is able to reflect this when the enum appears by itself, just not when it's stored as a property. The simplest fix is to hook into the TypeInfo calculation which computes a TypeInfo (basically, the tree of fields) from a TypeRef (basically, the name of the type, including generic context). Specifically, we sometimes end up here with a "type alias" that none of the lookup support seems to be able to handle. Fortunately, these aliases demangle into a pretty predictable shape, so this just pattern-matches the specific demangle tree shape to recognize these as "type aliases in the `__C` module whose name starts with `CF` and ends with `Ref`". Resolves rdar://82465109