libabigail
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
abg-hash.cc File Reference
#include <functional>
#include <cstring>
#include <xxhash.h>
#include "abg-internal.h"
#include "abg-ir-priv.h"
#include "abg-hash.h"
#include "abg-ir.h"
Include dependency graph for abg-hash.cc:

Go to the source code of this file.

Namespaces

namespace  abigail
 Toplevel namespace for libabigail.
 
namespace  abigail::hashing
 Namespace for hashing.
 
namespace  abigail::ir
 The namespace of the internal representation of ABI artifacts like types and decls.
 

Macros

#define MAYBE_RETURN_EARLY_FROM_HASHING_TO_AVOID_CYCLES(type)
 

Functions

void add_to_hashing_state (const ir::type_or_decl_base &tod, hashing::hashing_state s)
 Add a state to the hashing state of a given IR node.
 
hash_t combine_hashes (hash_t val1, hash_t val2)
 Combine two hash values to produce a third hash value.
 
bool deserialize_hash (const string &input, uint64_t &hash)
 Read a string of characters representing a string of hexadecimal digits which itself represents a hash value that was computed using the XH64 algorithm from the xxhash project.
 
uint32_t fnv_hash (const std::string &str)
 Compute a stable string hash.
 
hashing::hashing_state get_hashing_state (const type_or_decl_base &tod)
 Get the hashing state of an IR node.
 
hash_t get_subtype_hash (const type_or_decl_base *t)
 Compute (or get) the hash of a sub-type of the type for which we are currently computing the hash. It does so by preventing infinite loops.
 
hash_t get_subtype_hash (type_or_decl_base_sptr t)
 Compute (or get) the hash of a sub-type of the type for which we are currently computing the hash. It does so by preventing infinite loops.
 
hash_t hash (const std::string &str)
 Hash a string.
 
hash_t hash (uint64_t v, uint64_t seed)
 Hash an integer value and combine it with a hash previously computed.
 
void remove_from_hashing_state (const ir::type_or_decl_base &tod, hashing::hashing_state s)
 Remove a state to the hashing state of a given IR node.
 
bool serialize_hash (uint64_t hash, string &output)
 Serialiaze a hash value computed using the XH64 algorithm (from the xxhash project) into a string of characters representing the digits of the hash in the canonical form requested by the xxhash project. That canonical form is basically a big endian representation of the hexadecimal hash number.
 
void set_hashing_state (const type_or_decl_base &tod, hashing::hashing_state s)
 Set the hashing state of an IR node.
 

Macro Definition Documentation

◆ MAYBE_RETURN_EARLY_FROM_HASHING_TO_AVOID_CYCLES

#define MAYBE_RETURN_EARLY_FROM_HASHING_TO_AVOID_CYCLES (   type)

Definition at line 396 of file abg-hash.cc.