Skip to content

Conversation

@kastiglione
Copy link
Contributor

@kastiglione kastiglione commented Jul 24, 2025

Originally implemented in swiftlang/swift#29014.

I've made a couple changes:

  1. Use the target's address size, not lldb
  2. Replaced the loop with a format string

@jimingham
Copy link
Collaborator

I don't know enough about how SmallBItVector works to know if this is right or not.

@kastiglione
Copy link
Contributor Author

I did some manual testing:

  llvm::SmallBitVector v{10};
  v.set(2, 5);

then the output before and after was:

(llvm::SmallBitVector) v = [0000000000]
...
(llvm::SmallBitVector) v = [0000011100]

Copy link
Collaborator

@jimingham jimingham left a comment

Choose a reason for hiding this comment

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

This can't hurt anything, and if it works in sniff testing is a good sign it's right.
At some point we need to come up with a way of testing the llvm & lldb data formatters but that's obviously a bigger change that's out of scope for this PR.

@kastiglione kastiglione merged commit eba0c57 into llvm:main Jul 28, 2025
10 checks passed
@kastiglione kastiglione deleted the llvm-utils-Add-summary-formatter-for-SmallBitVector branch July 28, 2025 17:38
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