mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Add STL-style typedefs and default constructors to make it possible to
use DenseMap in more contexts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58256 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
26b86a0b56
commit
13e781ebe7
@ -105,6 +105,8 @@ class DenseMap {
|
||||
unsigned NumEntries;
|
||||
unsigned NumTombstones;
|
||||
public:
|
||||
typedef KeyT key_type;
|
||||
typedef ValueT mapped_type;
|
||||
typedef BucketT value_type;
|
||||
|
||||
DenseMap(const DenseMap& other) {
|
||||
@ -452,6 +454,8 @@ class DenseMapIterator {
|
||||
protected:
|
||||
const BucketT *Ptr, *End;
|
||||
public:
|
||||
DenseMapIterator(void) : Ptr(0), End(0) {}
|
||||
|
||||
DenseMapIterator(const BucketT *Pos, const BucketT *E) : Ptr(Pos), End(E) {
|
||||
AdvancePastEmptyBuckets();
|
||||
}
|
||||
@ -494,6 +498,7 @@ private:
|
||||
template<typename KeyT, typename ValueT, typename KeyInfoT, typename ValueInfoT>
|
||||
class DenseMapConstIterator : public DenseMapIterator<KeyT, ValueT, KeyInfoT> {
|
||||
public:
|
||||
DenseMapConstIterator(void) : DenseMapIterator<KeyT, ValueT, KeyInfoT>() {}
|
||||
DenseMapConstIterator(const std::pair<KeyT, ValueT> *Pos,
|
||||
const std::pair<KeyT, ValueT> *E)
|
||||
: DenseMapIterator<KeyT, ValueT, KeyInfoT>(Pos, E) {
|
||||
|
Loading…
Reference in New Issue
Block a user