[libcxx-commits] [libcxx] [libc++] Replace `__compressed_pair` with `[[no_unique_address]]` (PR #76756)
Jonathan Wakely via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Dec 4 05:04:00 PST 2024
================
@@ -231,7 +199,7 @@ def __init__(self, val):
def to_string(self):
"""Build a python string from the data whether stored inline or separately."""
- value_field = _value_of_pair_first(self.val["__r_"])
+ value_field = self.val["__rep_"]
----------------
jwakely wrote:
For the record, this change means that `utils/gdb/libcxx/printers.py` no longer supports objects that were compiled against older versions of libc++. It is of course your call whether you care about that.
When we change layout of libstdc++ types I generally try to ensure that the printers are able to handle the old and new layouts, so that GDB can still do pretty printing for binaries that weren't all compiled with the same GCC release (or which were compiled with the same old GCC release but are dynamically linked to a newer `libstdc++.so.6` at runtime, and so are using the `printers.py` from the newer libstdc++). That isn't trivial to support though, and needs extra tests like https://gcc.gnu.org/cgit/gcc/tree/libstdc++-v3/testsuite/libstdc++-prettyprinters/compat.cc to be sure it keeps working. I'm not requesting that libc++ does it, just noting the consequence of this change which I didn't see mentioned in the PR.
https://github.com/llvm/llvm-project/pull/76756
More information about the libcxx-commits
mailing list