diff options
author | Dave Lee <davelee.com@gmail.com> | 2025-09-02 14:23:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-02 14:23:56 -0700 |
commit | 023a98c2ae8a260632f5fa71aaede95c4a981399 (patch) | |
tree | 423eeb24e26bc1f6580ae584ee70d9389ebc6a69 /llvm/test/tools/llvm-objdump | |
parent | cc9acb9df7f7e598a6c93eaa1f2b1405a6b73bad (diff) | |
download | llvm-023a98c2ae8a260632f5fa71aaede95c4a981399.zip llvm-023a98c2ae8a260632f5fa71aaede95c4a981399.tar.gz llvm-023a98c2ae8a260632f5fa71aaede95c4a981399.tar.bz2 |
[lldb] Add Pythonic API to SBStructuredData extension (#155061)
* Adds `dynamic` property to automatically convert `SBStructuredData`
instances to the associated Python type (`str`, `int`, `float`, `bool`,
`NoneType`, etc)
* Implements `__getitem__` for Pythonic array and dictionary
subscripting
* Subscripting return the result of the `dynamic` property
* Updates `__iter__` to support dictionary instances (supporting `for`
loops)
* Adds conversion to `str`, `int`, and `float`
* Adds Pythonic `bool` conversion
With these changes, these two expressions are equal:
```py
data["name"] == data.GetValueForKey("name").GetStringValue(1024)
```
Additionally did some cleanup in TestStructuredDataAPI.py.
Diffstat (limited to 'llvm/test/tools/llvm-objdump')
0 files changed, 0 insertions, 0 deletions