[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
Tue Jun 9 00:56:55 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:

Lets be faithful to the legacy layout and add the compressed pair here

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


More information about the lldb-commits mailing list