diff options
author | Michael Buch <michaelbuch12@gmail.com> | 2025-07-07 09:13:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-07 09:13:52 +0100 |
commit | 6fec6a98c01523a5478ce2aa9617e884dc772f6f (patch) | |
tree | 9946b697401e6e81d4e6e2251ef0778810147b0c /lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp | |
parent | d06956e24afaed103dfbcc67e81257692ae0a8b2 (diff) | |
download | llvm-6fec6a98c01523a5478ce2aa9617e884dc772f6f.zip llvm-6fec6a98c01523a5478ce2aa9617e884dc772f6f.tar.gz llvm-6fec6a98c01523a5478ce2aa9617e884dc772f6f.tar.bz2 |
[lldb][Formatters] Make libc++ and libstdc++ std::shared_ptr formatters consistent with each other (#147165)
This patch adjusts the libcxx and libstdcxx std::shared_ptr formatters
to look the same.
Changes to libcxx:
* Now creates a synthetic child called `pointer` (like we already do for
`std::unique_ptr`)
Changes to libstdcxx:
* When asked to dereference the pointer, cast the type of the result
ValueObject to the element type (which we get from the template argument
to std::shared_ptr).
Before:
```
(std::__shared_ptr<int, __gnu_cxx::_S_atomic>::element_type) *foo = 123
```
After:
```
(int) *foo = 123
```
Tested in https://github.com/llvm/llvm-project/pull/147141
Diffstat (limited to 'lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp')
0 files changed, 0 insertions, 0 deletions