[all-commits] [llvm/llvm-project] a89e23: [lldb][DataFormatter] Format libstdc++ unique_ptr ...
Michael Buch via All-commits
all-commits at lists.llvm.org
Fri Jul 4 01:18:45 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a89e232058a29260eb9bfe77b862715ce875f962
https://github.com/llvm/llvm-project/commit/a89e232058a29260eb9bfe77b862715ce875f962
Author: Michael Buch <michaelbuch12 at gmail.com>
Date: 2025-07-04 (Fri, 04 Jul 2025)
Changed paths:
M lldb/include/lldb/DataFormatters/FormattersHelpers.h
M lldb/source/DataFormatters/FormattersHelpers.cpp
M lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
M lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp
M lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/TestDataFormatterLibcxxSharedPtr.py
M lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/main.cpp
M lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/TestDataFormatterStdUniquePtr.py
Log Message:
-----------
[lldb][DataFormatter] Format libstdc++ unique_ptr like we do libc++ (#146909)
The only difference is that with libc++ the summary string contains the
derefernced pointer value. With libstdc++ we currently display the
pointer itself, which seems redundant. E.g.,
```
(std::unique_ptr<int>) iup = 0x55555556d2b0 {
pointer = 0x000055555556d2b0
}
(std::unique_ptr<std::basic_string<char> >) sup = 0x55555556d2d0 {
pointer = "foobar"
}
```
This patch moves the logic into a common helper that's shared between
the libc++ and libstdc++ formatters.
After this patch we can combine the libc++ and libstdc++ API tests (see
https://github.com/llvm/llvm-project/pull/146740).
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list