Skip to content

Add a Transform() utility for rewriting demangle trees. (NFC) #1927

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 9, 2020

Conversation

adrian-prantl
Copy link

Transform() recursively transforms a demangle tree by doing a
post-order traversal and replacing each node with fn(node).

In most cases this utility will do less work than the ad-hoc
implementation it is replacing because we now only recreate nodes that
actually changed.

(cherry picked from commit e933fd7995439c8873f9a021dd5d4f5987fbd0bb)

@adrian-prantl
Copy link
Author

#1926

Transform() recursively transforms a demangle tree by doing a
post-order traversal and replacing each node with fn(node).

In most cases this utility will do less work than the ad-hoc
implementation it is replacing because we now only recreate nodes that
actually changed.

(cherry picked from commit 347e815)
@adrian-prantl adrian-prantl merged commit 23c9d01 into swiftlang:swift/next Oct 9, 2020
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.

1 participant