[all-commits] [llvm/llvm-project] 9ed72d: [lldb][NFCI] Replace bespoke iterator check with s...
Alex via All-commits
all-commits at lists.llvm.org
Thu Aug 31 10:57:33 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9ed72d4d4d507b60a54f6b74e86433f837ded93c
https://github.com/llvm/llvm-project/commit/9ed72d4d4d507b60a54f6b74e86433f837ded93c
Author: Alex Langford <alangford at apple.com>
Date: 2023-08-31 (Thu, 31 Aug 2023)
Changed paths:
M lldb/source/Utility/StructuredData.cpp
Log Message:
-----------
[lldb][NFCI] Replace bespoke iterator check with std::next
The primary goal of this change is to change `if (pair != *(--m_dict.end()))`
to `if (std::next(iter) != m_dict.end())`. I was experimenting with
changing the underlying type of `m_dict` and found that this was an
issue. Specifically, it assumes that m_dict iterators are bidirectional.
This change should make it so we only need to assume m_dict iterators can move
forward.
Differential Revision: https://reviews.llvm.org/D159150
More information about the All-commits
mailing list