21#ifndef GCC_ORDERED_HASH_MAP_H
22#define GCC_ORDERED_HASH_MAP_H
32template<
typename KeyId,
typename Value,
36 typedef typename Traits::key_type
Key;
56 bool put (
const Key &k,
const Value &v)
58 bool existed =
m_map.put (k, v);
56 bool put (
const Key &k,
const Value &v) {
…}
86 Value &ret =
m_map.get_or_insert (k, &_existed);
146 template <
typename K,
typename V>
147 operator std::pair<K, V> ()
const {
return std::pair<K, V> (
first,
second); }
187 iterator
i = iterator (*
this, 0);
188 while (!
i.valid_index_p () &&
i !=
end ())
192 iterator
end ()
const {
return iterator (*
this,
m_keys.length ()); }
211template<
typename Key,
typename Value,
unsigned m_idx
Definition ordered-hash-map.h:180
bool valid_index_p() const
Definition ordered-hash-map.h:167
bool operator!=(const iterator &other) const
Definition ordered-hash-map.h:160
iterator & operator++()
Definition ordered-hash-map.h:123
iterator(const ordered_hash_map &map, unsigned idx)
Definition ordered-hash-map.h:120
reference_pair operator*()
Definition ordered-hash-map.h:150
const ordered_hash_map & m_ordered_hash_map
Definition ordered-hash-map.h:179
Definition ordered-hash-map.h:35
bool put(const Key &k, const Value &v)
Definition ordered-hash-map.h:56
sinfo_hashmap_traits::key_type Key
Definition ordered-hash-map.h:36
hash_map< void *, int > m_key_index
Definition ordered-hash-map.h:206
Value & get_or_insert(const Key &k, bool *existed=NULL)
Definition ordered-hash-map.h:83
ordered_hash_map(const ordered_hash_map &other)
Definition ordered-hash-map.h:41
Value * get(const Key &k)
Definition ordered-hash-map.h:74
void operator=(const ordered_hash_map &)
hash_map< void *, sinfo *, sinfo_hashmap_traits > m_map
Definition ordered-hash-map.h:200
ordered_hash_map()
Definition ordered-hash-map.h:39
auto_vec< Key > m_keys
Definition ordered-hash-map.h:203
iterator begin() const
Definition ordered-hash-map.h:185
iterator end() const
Definition ordered-hash-map.h:192
size_t elements() const
Definition ordered-hash-map.h:113
void remove(const Key &k)
Definition ordered-hash-map.h:108
void empty()
Definition ordered-hash-map.h:115
Definition lra-spills.cc:101
static struct string2counter_map map[debug_counter_number_of_counters]
Definition dbgcnt.cc:39
i
Definition poly-int.h:776
Definition ordered-hash-map.h:139
Value & second
Definition ordered-hash-map.h:141
const Key & first
Definition ordered-hash-map.h:140
reference_pair(const Key &key, Value &value)
Definition ordered-hash-map.h:143
Definition hash-map-traits.h:33
#define NULL
Definition system.h:50
#define gcc_assert(EXPR)
Definition system.h:814
#define FOR_EACH_VEC_ELT(V, I, P)
Definition vec.h:1895