Skip to content
Commit 04aa943b authored by Alex Langford's avatar Alex Langford
Browse files

[lldb] Expose a const iterator for SymbolContextList

There are many situations where we'll iterate over a SymbolContextList
with the pattern:
```
SymbolContextList sc_list;
// Fill in sc_list here
for (auto i = 0; i < sc_list.GetSize(); i++) {
  SymbolContext sc;
  sc_list.GetSymbolAtContext(i, sc);

  // Do work with sc
}
```
Adding an iterator to iterate over the instances directly means we don't
have to do bounds checking or create a copy of every element of the
SymbolContextList.

Differential Revision: https://reviews.llvm.org/D149900
parent 4c9c1a4e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment