GCC Middle and Back End API Reference
simple_hashmap_traits< H, Value > Struct Template Reference

#include <hash-map-traits.h>

Inheritance diagram for simple_hashmap_traits< H, Value >:

Public Types

typedef H::value_type key_type
 

Static Public Member Functions

static hashval_t hash (const key_type &)
 
static bool equal_keys (const key_type &, const key_type &)
 
template<typename T >
static void remove (T &)
 
template<typename T >
static bool is_empty (const T &)
 
template<typename T >
static bool is_deleted (const T &)
 
template<typename T >
static void mark_empty (T &)
 
template<typename T >
static void mark_deleted (T &)
 

Static Public Attributes

static const bool maybe_mx = true
 
static const bool empty_zero_p = H::empty_zero_p
 

Detailed Description

template<typename H, typename Value>
struct simple_hashmap_traits< H, Value >
A hash map traits.
   Copyright (C) 2015-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/>.   
Bacause mem-stats.h uses default hashmap traits, we have to
put the class to this separate header file.   
Implement hash_map traits for a key with hash traits H.  Empty and
deleted map entries are represented as empty and deleted keys.   

Member Typedef Documentation

◆ key_type

template<typename H , typename Value >
typedef H::value_type simple_hashmap_traits< H, Value >::key_type

Member Function Documentation

◆ equal_keys()

template<typename H , typename Value >
bool simple_hashmap_traits< H, Value >::equal_keys ( const key_type & k1,
const key_type & k2 )
inlinestatic

References ggc_alloc().

◆ hash()

template<typename H , typename Value >
hashval_t simple_hashmap_traits< H, Value >::hash ( const key_type & h)
inlinestatic

References ggc_alloc().

◆ is_deleted()

template<typename H , typename Value >
template<typename T >
bool simple_hashmap_traits< H, Value >::is_deleted ( const T & entry)
inlinestatic

◆ is_empty()

template<typename H , typename Value >
template<typename T >
bool simple_hashmap_traits< H, Value >::is_empty ( const T & entry)
inlinestatic

◆ mark_deleted()

template<typename H , typename Value >
template<typename T >
void simple_hashmap_traits< H, Value >::mark_deleted ( T & entry)
inlinestatic

◆ mark_empty()

template<typename H , typename Value >
template<typename T >
void simple_hashmap_traits< H, Value >::mark_empty ( T & entry)
inlinestatic

◆ remove()

template<typename H , typename Value >
template<typename T >
void simple_hashmap_traits< H, Value >::remove ( T & entry)
inlinestatic

Field Documentation

◆ empty_zero_p

template<typename H , typename Value >
const bool simple_hashmap_traits< H, Value >::empty_zero_p = H::empty_zero_p
static

◆ maybe_mx

template<typename H , typename Value >
const bool simple_hashmap_traits< H, Value >::maybe_mx = true
static

The documentation for this struct was generated from the following file: