GCC Middle and Back End API Reference
|
Go to the source code of this file.
Data Structures | |
class | hash_map< KeyId, Value, Traits > |
struct | hash_map< KeyId, Value, Traits >::hash_entry |
class | hash_map< KeyId, Value, Traits >::iterator |
class | hash_map< KeyId, Value, Traits >::iterator::reference_pair |
Macros | |
#define | DEFINE_PCH_HELPER(T) static void pch_nx_helper (T, gt_pointer_operator, void *) { } |
Enumerations | |
enum | hm_alloc { hm_heap = false , hm_ggc = true } |
Variables | |
const size_t | default_hash_map_size = 13 |
References ggc_alloc(), and gt_cleare_cache().
Referenced by gt_cleare_cache().
References ggc_alloc(), and gt_pch_nx().
Referenced by gt_pch_nx().
References ggc_alloc(), and NULL.
|
inline |
References hash_map< KeyId, Value, Traits >::create_ggc(), and ggc_alloc().
Like h->get, but handles null h.
References ggc_alloc(), and NULL.
|
inline |
Like h->get, but handles null h.
References ggc_alloc().
|
inline |
Like h->put, but handles null h.
References ggc_alloc().
A type-safe hash map. Copyright (C) 2014-2024 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
Class hash_map is a hash-value based container mapping objects of KeyId type to those of the Value type. Both KeyId and Value may be non-trivial (non-POD) types provided a suitabe Traits class. A few default Traits specializations are provided for basic types such as integers, pointers, and std::pair. Inserted elements are value-initialized either to zero for POD types or by invoking their default ctor. Removed elements are destroyed by invoking their dtor. On hash_map destruction all elements are removed. Objects of hash_map type are copy-constructible but not assignable.