Skip to content

[llvm][utils] Add synthetic provider for llvm::DenseSet #143631

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

Conversation

kastiglione
Copy link
Contributor

@kastiglione kastiglione commented Jun 10, 2025

Add a synthetic child provider for DenseSet, which is a wrapper around DenseMap. This provider leverages the existing DenseMap provider, reshaping its dictionary structured children into a set.

Comment on lines -375 to +382
key = buckets.GetValueForExpressionPath(f"[{index}].first")
bucket = buckets.GetValueForExpressionPath(f"[{index}]")
key = bucket.GetChildAtIndex(0)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is because the entries of a DenseSet are DenseSetPair, which is not actually a pair. There's only one child, and its name is key. The original code works for DenseMapPair, which has two children, first and second. Using GetChildAtIndex(0) will retrieve first for maps, and key for sets.

@kastiglione kastiglione merged commit cbc2ef0 into llvm:main Jun 12, 2025
8 checks passed
@kastiglione kastiglione deleted the llvm-utils-Add-synthetic-provider-for-llvm-DenseSet branch June 12, 2025 17:13
tomtor pushed a commit to tomtor/llvm-project that referenced this pull request Jun 14, 2025
Add a synthetic child provider for `DenseSet`, which is a wrapper around
`DenseMap`. This provider leverages the existing `DenseMap` provider,
reshaping its dictionary structured children into a set.
akuhlens pushed a commit to akuhlens/llvm-project that referenced this pull request Jun 24, 2025
Add a synthetic child provider for `DenseSet`, which is a wrapper around
`DenseMap`. This provider leverages the existing `DenseMap` provider,
reshaping its dictionary structured children into a set.
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.

2 participants