Skip to content

Conversation

@kastiglione
Copy link

Update TypeSystemSwiftTypeRef::IsAggregateType to match SwiftASTContext. This handles non-strong storage types (weak, unowned, unmanaged) by looking at the underlying type.

For example, given this top of a demangle tree:

kind=Global
  kind=TypeMangling
    kind=Type
      kind=Weak
        kind=Type
          kind=BoundGenericEnum

This code traverses past Weak and its child Type and then decides based on the node kind below that (BoundGenericEnum in this case).

rdar://73173573

@kastiglione
Copy link
Author

@swift-ci test

@kastiglione
Copy link
Author

To test this I am adding IsAggregateType to the SB API: https://reviews.llvm.org/D121252

@adrian-prantl
Copy link

This is good — is there any reason why we should handle why IsAggregateType handles Storage nodes and other Is... functions possibly don't? Should we peel them of in getCanonicalDemangleTree()?

@adrian-prantl
Copy link

In the short term consistency with SwiftASTContext is also a good goal, of course.

@kastiglione
Copy link
Author

Should we peel them off in getCanonicalDemangleTree()?

I was asking myself this question too, and was going to bring it up. I think the next step is to try that suggestion, and see where tests fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants