diff options
author | Raphael Isemann <teemperor@gmail.com> | 2021-07-22 14:18:57 +0200 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2021-07-22 15:03:30 +0200 |
commit | 77440d644b3ba26443c1d14d04a4046fab07d731 (patch) | |
tree | e53a98cf2eec6226c32b2b3726f14a9a2e057701 /llvm/lib/Transforms/Utils/ModuleUtils.cpp | |
parent | 312b43da05002bbe4a06de925e34b216252bc412 (diff) | |
download | llvm-77440d644b3ba26443c1d14d04a4046fab07d731.zip llvm-77440d644b3ba26443c1d14d04a4046fab07d731.tar.gz llvm-77440d644b3ba26443c1d14d04a4046fab07d731.tar.bz2 |
[lldb][NFC] Allow range-based for loops over DWARFDIE's children
This patch adds the ability to get a DWARFDIE's children as an LLVM range.
This way we can use for range loops to iterate over them and we can use LLVM's
algorithms like `llvm::all_of` to query all children.
The implementation has to do some small shenanigans as the iterator needs to
store a DWARFDIE, but a DWARFDIE container is also a DWARFDIE so it can't return
the iterator by value. I just made the `children` getter a templated function to
avoid the cyclic dependency.
Reviewed By: #lldb, werat, JDevlieghere
Differential Revision: https://reviews.llvm.org/D103172
Diffstat (limited to 'llvm/lib/Transforms/Utils/ModuleUtils.cpp')
0 files changed, 0 insertions, 0 deletions