#ifndef LLVM_ADT_SCOPEDHASHTABLE_H
#define LLVM_ADT_SCOPEDHASHTABLE_H
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseMapInfo.h"
#include "llvm/Support/AllocatorBase.h"
#include <cassert>
#include <new>
namespace llvm {
template <typename K, typename V, typename KInfo = DenseMapInfo<K>,
typename AllocatorTy = MallocAllocator>
class ScopedHashTable;
template <typename K, typename V>
class ScopedHashTableVal { … };
template <typename K, typename V, typename KInfo = DenseMapInfo<K>,
typename AllocatorTy = MallocAllocator>
class ScopedHashTableScope { … };
template <typename K, typename V, typename KInfo = DenseMapInfo<K>>
class ScopedHashTableIterator {
ScopedHashTableVal<K, V> *Node;
public:
ScopedHashTableIterator(ScopedHashTableVal<K, V> *node) : … { … }
V &operator*() const { … }
V *operator->() const { … }
bool operator==(const ScopedHashTableIterator &RHS) const { … }
bool operator!=(const ScopedHashTableIterator &RHS) const { … }
inline ScopedHashTableIterator& operator++() { … }
ScopedHashTableIterator operator++(int) { … }
};
template <typename K, typename V, typename KInfo, typename AllocatorTy>
class ScopedHashTable : detail::AllocatorHolder<AllocatorTy> { … };
template <typename K, typename V, typename KInfo, typename Allocator>
ScopedHashTableScope<K, V, KInfo, Allocator>::
ScopedHashTableScope(ScopedHashTable<K, V, KInfo, Allocator> &ht) : … { … }
template <typename K, typename V, typename KInfo, typename Allocator>
ScopedHashTableScope<K, V, KInfo, Allocator>::~ScopedHashTableScope() { … }
}
#endif