[libcxx-commits] [PATCH] D114986: libcxx pretty printers: remove non-lazy_string fallback

David Blaikie via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Dec 2 14:31:19 PST 2021


dblaikie created this revision.
Herald added a subscriber: arichardson.
This revision was not accepted when it landed; it landed in state "Draft".
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1f2492b7daf6: libcxx pretty printers: remove non-lazy_string fallback (authored by dblaikie).
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

This has been supported on gdb for something like ~10 years, so doesn't
seem necessary to carry a fallback.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114986

Files:
  libcxx/utils/gdb/libcxx/printers.py


Index: libcxx/utils/gdb/libcxx/printers.py
===================================================================
--- libcxx/utils/gdb/libcxx/printers.py
+++ libcxx/utils/gdb/libcxx/printers.py
@@ -234,9 +234,7 @@
         else:
             data = short_field["__data_"]
             size = self._get_short_size(short_field, short_size)
-        if hasattr(data, "lazy_string"):
-            return data.lazy_string(length=size)
-        return data.string(length=size)
+        return data.lazy_string(length=size)
 
     def display_hint(self):
         return "string"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114986.391464.patch
Type: text/x-patch
Size: 570 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211202/4351e703/attachment.bin>


More information about the libcxx-commits mailing list