Better support CoreFoundation types in RemoteMirror #76586
Merged
+170
−33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 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 withCF
and ends withRef
".Resolves rdar://82465109