llvm-project/libcxx/utils
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
..
ci [libc++] Install clang-tidy in docker containers 2022-01-17 21:05:42 +01:00
gdb/libcxx [libc++] Fix GDB pretty printers when GDB uses Python 2.7 2022-01-19 10:11:45 +00:00
libcxx [libc++] Persistently cache memoized operations during Lit configuration 2022-01-18 10:44:23 -05:00
symcheck-blacklists
CMakeLists.txt [libc++][NFC] Make private header generation CMake comment more consistent 2021-07-29 14:17:04 -04:00
cat_files.py Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
generate_abi_list.py generate_header_tests.py: Sort the header files ASCIIbetically. 2020-12-14 09:56:07 -05:00
generate_feature_test_macro_components.py [libc++] Implement P1072R10 (std::basic_string::resize_and_overwrite) 2022-01-07 00:09:16 +01:00
generate_header_inclusion_tests.py [libc++] Fix some tests that were broken in the single-threaded configuration 2021-11-19 14:24:15 -05:00
generate_header_tests.py [libc++] [test] Add a test for proper _Uglification of template parameter names. 2022-01-14 15:50:37 -05:00
generate_private_header_tests.py [libc++] [test] Remove "// -*- C++ -*-" comments from generated .cpp files. 2021-10-01 12:04:19 -04:00
graph_header_deps.py [libc++] Add the version header to all headers. 2022-01-04 19:50:59 +01:00
merge_archives.py Remove unused imports. 2021-08-17 13:04:02 -07:00
run.py [libc++] Fix codesigning in run.py 2021-04-01 13:39:49 -04:00
ssh.py [libc++][NFC] Resolve Python 2 FIXME 2021-11-12 13:55:22 -05:00
sym_diff.py Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00