llvm-project/libcxx
Alex Richardson 89103bd2f0 [libc++] Fix GDB pretty printers when GDB uses Python 2.7
The gdb_pretty_printer_test.sh fails if GDB was built against Python 2.7
since Python 2 expects iterators to have a next() method rather than
using __next__. To make the pretty printers work with both Python 2 and 3
we can simply set next to __next__ in the iterator classes.

Python 2.7 support was removed in f46f93b478,
so this partially reverts that commit. While Python 2.7 is EOL, it
appears there are still many GDB installations that are linked against
Python 2.7, so we may want to keep this tiny amount of compat code
around for a while longer.

Without this commit the tests fails with errors such as:
```
GDB printed:
   u"std::tuple containingTypeError: iter() returned non-iterator of type '_Children'\n"
Value should match:
   u'std::tuple containing = {[1] = 2, [2] = 3, [3] = 4}'
```

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D117470
2022-01-19 10:11:45 +00:00
..
benchmarks [libc++] [bench] Stop using uniform_int_distribution<char> in benchmarks. 2022-01-17 14:31:33 -05:00
cmake [libcxx][libcxxabi][libunwind][cmake] Use `GNUInstallDirs` to support custom installation dirs 2022-01-18 06:44:57 +00:00
docs [libc++] [API BREAK] Change `fs::path::iterator::iterator_category` to `input_iterator_tag`. 2022-01-17 16:33:23 -05:00
include [libcxx][test] compiler options are non-portable 2022-01-18 11:34:57 -08:00
lib Microsoft's floating-point to_chars powered by Ryu and Ryu Printf 2021-12-12 16:34:50 +01:00
src [libc++] Split a few utilities out of __threading_support 2022-01-18 12:23:44 -05:00
test [libcxx][test] test _LIBCPP_VERSION with #ifdef, not #if 2022-01-18 19:37:03 -08:00
utils [libc++] Fix GDB pretty printers when GDB uses Python 2.7 2022-01-19 10:11:45 +00:00
.clang-format [libc++] Update clang-format to C++20. 2021-10-30 12:50:57 +02:00
.clang-tidy [libc++][NFC] Disable clang-tidy checks 2021-12-06 01:51:23 +01:00
.gitignore
CMakeLists.txt [libcxx][libcxxabi][libunwind][cmake] Use `GNUInstallDirs` to support custom installation dirs 2022-01-18 06:44:57 +00:00
CREDITS.TXT Microsoft's floating-point to_chars powered by Ryu and Ryu Printf 2021-12-12 16:34:50 +01:00
LICENSE.TXT
TODO.TXT [libc++] Disallow volatile types in std::allocator 2021-09-22 11:47:38 -04:00
appveyor-reqs-install.cmd
appveyor.yml