Skip to content

Demangler: Add option to omit closure signatures (#73331)#73353

Merged
kastiglione merged 2 commits into
release/6.0from
dl/Demangler-Add-option-to-omit-closure-signatures-73331
May 1, 2024
Merged

Demangler: Add option to omit closure signatures (#73331)#73353
kastiglione merged 2 commits into
release/6.0from
dl/Demangler-Add-option-to-omit-closure-signatures-73331

Conversation

@kastiglione
Copy link
Copy Markdown
Contributor

@kastiglione kastiglione commented Apr 30, 2024

Add a new demangler option which excludes a closure's type signature.

This will be used in lldb.

Closures are not subject to overloading, and so the signature will never be needed to
disambiguate. A demangled closure is uniquely identifiable by its index(es) and parent.

Where opaque types are involved, the concrete type signature can be quite complex. This
demangling option allows callers to avoid printing the underlying complex nested
concrete types.

Example:

before: closure #1 (Swift.Int) -> () in closure #1 (Swift.Int) -> () in main
after: closure #1 in closure #1 in main

Cherry picked from #73331

Add a new demangler option which excludes a closure's type signature.

This will be used in lldb.

Closures are not subject to overloading, and so the signature will never be used to 
disambiguate. A demangled closure is uniquely identifiable by its index(s) and parent.

Where opaque types are involved, the concrete type signature can be quite complex. This 
demangling option allows callers to avoid printing the underlying complex nested 
concrete types.

Example:

before: `closure #1 (Swift.Int) -> () in closure #1 (Swift.Int) -> () in main`
after: `closure #1 in closure #1 in main`
@kastiglione kastiglione requested a review from a team as a code owner April 30, 2024 20:44
@kastiglione
Copy link
Copy Markdown
Contributor Author

@swift-ci test

Comment thread lib/Demangling/NodePrinter.cpp Outdated
@kastiglione
Copy link
Copy Markdown
Contributor Author

@swift-ci smoke test

@kastiglione
Copy link
Copy Markdown
Contributor Author

@swift-ci test

@kastiglione kastiglione merged commit a85dbaf into release/6.0 May 1, 2024
@kastiglione kastiglione deleted the dl/Demangler-Add-option-to-omit-closure-signatures-73331 branch May 1, 2024 17:03
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