mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-08 03:30:22 +00:00
OnDiskHashTable: Provide iterator_range for keys and data
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206555 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a9da909e57
commit
2359d30af6
@ -444,6 +444,10 @@ public:
|
||||
}
|
||||
key_iterator key_end() { return key_iterator(); }
|
||||
|
||||
iterator_range<key_iterator> keys() {
|
||||
return make_range(key_begin(), key_end());
|
||||
}
|
||||
|
||||
/// \brief Iterates over all the entries in the table, returning the data.
|
||||
class data_iterator {
|
||||
const unsigned char *Ptr;
|
||||
@ -511,6 +515,10 @@ public:
|
||||
}
|
||||
data_iterator data_end() { return data_iterator(); }
|
||||
|
||||
iterator_range<data_iterator> data() {
|
||||
return make_range(data_begin(), data_end());
|
||||
}
|
||||
|
||||
/// \brief Create the hash table.
|
||||
///
|
||||
/// \param Buckets is the beginning of the hash table itself, which follows
|
||||
|
Loading…
Reference in New Issue
Block a user