[lldb] Adjust libc++ string formatter for changes in D123580
authorPavel Labath <pavel@labath.sk>
Wed, 20 Apr 2022 18:52:14 +0000 (20:52 +0200)
committerPavel Labath <pavel@labath.sk>
Thu, 21 Apr 2022 12:07:56 +0000 (14:07 +0200)
commit1056c56786c10866ffd7e878f8c75ad1f0914c07
tree22a02d9e735c103fc8cbac11fa937fa6bc04464d
parentc5600aef888b9c32c578edc9c807d61d72a37c08
[lldb] Adjust libc++ string formatter for changes in D123580

The code needs more TLC, but for now I've tried making only the changes
that are necessary to get the tests passing -- postponing the more
invasive changes after I create a more comprehensive test.

In a couple of places I have changed the index-based element accesses to
name-based ones (as these are less sensitive to code perturbations). I'm
not sure why the code was using indexes in the first place, but I've
(manually) tested the change with various libc++ versions, and found no
issues with this approach.

Differential Revision: https://reviews.llvm.org/D124113
lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp