[Lldb-commits] [lldb] Teach LLDB's pretty-printer about libc++'s various `std::vector` layouts (PR #202438)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 11 03:49:30 PDT 2026


================
@@ -0,0 +1,70 @@
+#include <stddef.h>
+
+namespace std {
+inline namespace __LegacyLayout {
+template <typename T> class vector {
+public:
+  typedef T *pointer;
+
+  vector(pointer begin, size_t size) : __begin_(begin), __end_(begin + size) {}
+
+private:
+  pointer __begin_;
+  pointer __end_;
+  // __cap_ and __alloc_ aren't used, so they've been removed for simplicity.
----------------
Michael137 wrote:

I guess its a bit weird to add `LLDB_COMPRESSED_PAIR` here. Since we're not setting the `LLDB_COMPRESSED_PAIR_REV` (or whatever its called).

I don't feel super strongly about it, so its fine if you want to leave it out

https://github.com/llvm/llvm-project/pull/202438


More information about the lldb-commits mailing list