diff options
author | Ian Lance Taylor <iant@golang.org> | 2021-09-13 10:37:49 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-09-13 10:37:49 -0700 |
commit | e252b51ccde010cbd2a146485d8045103cd99533 (patch) | |
tree | e060f101cdc32bf5e520de8e5275db9d4236b74c /gcc/hash-map.h | |
parent | f10c7c4596dda99d2ee872c995ae4aeda65adbdf (diff) | |
parent | 104c05c5284b7822d770ee51a7d91946c7e56d50 (diff) | |
download | gcc-e252b51ccde010cbd2a146485d8045103cd99533.zip gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.gz gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.bz2 |
Merge from trunk revision 104c05c5284b7822d770ee51a7d91946c7e56d50.
Diffstat (limited to 'gcc/hash-map.h')
-rw-r--r-- | gcc/hash-map.h | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/gcc/hash-map.h b/gcc/hash-map.h index 0779c93..dd039f1 100644 --- a/gcc/hash-map.h +++ b/gcc/hash-map.h @@ -107,27 +107,31 @@ class GTY((user)) hash_map gt_pch_nx (&x, op, cookie); } - static void - pch_nx_helper (int, gt_pointer_operator, void *) - { - } - - static void - pch_nx_helper (unsigned int, gt_pointer_operator, void *) - { - } - - static void - pch_nx_helper (bool, gt_pointer_operator, void *) - { - } - template<typename T> static void pch_nx_helper (T *&x, gt_pointer_operator op, void *cookie) { op (&x, cookie); } + + /* The overloads below should match those in ggc.h. */ +#define DEFINE_PCH_HELPER(T) \ + static void pch_nx_helper (T, gt_pointer_operator, void *) { } + + DEFINE_PCH_HELPER (bool); + DEFINE_PCH_HELPER (char); + DEFINE_PCH_HELPER (signed char); + DEFINE_PCH_HELPER (unsigned char); + DEFINE_PCH_HELPER (short); + DEFINE_PCH_HELPER (unsigned short); + DEFINE_PCH_HELPER (int); + DEFINE_PCH_HELPER (unsigned int); + DEFINE_PCH_HELPER (long); + DEFINE_PCH_HELPER (unsigned long); + DEFINE_PCH_HELPER (long long); + DEFINE_PCH_HELPER (unsigned long long); + +#undef DEFINE_PCH_HELPER }; public: @@ -273,8 +277,12 @@ public: return reference_pair (e.m_key, e.m_value); } - bool - operator != (const iterator &other) const + bool operator== (const iterator &other) const + { + return m_iter == other.m_iter; + } + + bool operator != (const iterator &other) const { return m_iter != other.m_iter; } |