[all-commits] [llvm/llvm-project] d1e9d0: [LLDB][DataFormatter] Add data formatter for libcx...
Michael137 via All-commits
all-commits at lists.llvm.org
Tue Jul 12 02:15:42 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d1e9d0b27f3a59f80787bfe5cf10d4373275c477
https://github.com/llvm/llvm-project/commit/d1e9d0b27f3a59f80787bfe5cf10d4373275c477
Author: Michael Buch <michaelbuch12 at gmail.com>
Date: 2022-07-12 (Tue, 12 Jul 2022)
Changed paths:
M lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
M lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
M lldb/source/Plugins/Language/CPlusPlus/LibCxx.h
A lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unordered_map/Makefile
A lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unordered_map/TestDataFormatterLibccUnorderedMap.py
A lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unordered_map/main.cpp
Log Message:
-----------
[LLDB][DataFormatter] Add data formatter for libcxx std::unordered_map iterator
This patch adds a formatter for libcxx's `std::unordered_map` iterators.
The implementation follows a similar appraoch to the `std::map` iterator
formatter. I was hesistant about coupling the two into a common
implementation since the libcxx layouts might change for one of the
the containers but not the other.
All `std::unordered_map` iterators are covered with this patch:
1. const/non-const key/value iterators
2. const/non-const bucket iterators
Note that, we currently don't have a formatter for `std::unordered_map`.
This patch doesn't change that, we merely add support for its iterators,
because that's what Xcode users requested. One can still see contents
of `std::unordered_map`, whereas with iterators it's less ergonomic.
**Testing**
* Added API test
Differential Revision: https://reviews.llvm.org/D129364
More information about the All-commits
mailing list