libabigail
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.
 

Macros

#define MAYBE_FLAG_TYPE_AS_RECURSIVE(type, underlying, h)
 
#define MAYBE_RETURN_EARLY_FROM_HASHING_TO_AVOID_CYCLES(type)
 
#define MAYBE_RETURN_EARLY_IF_HASH_EXISTS(type)
 

Functions

hash_t combine_hashes (hash_t val1, hash_t val2)
 Combine two hash values to produce a third hash value. More...
 
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. More...
 
uint32_t fnv_hash (const std::string &str)
 Compute a stable string hash. More...
 
hashing::hashing_state get_hashing_state (const type_or_decl_base &tod)
 Get the hashing state of an IR node. More...
 
hash_t hash (const std::string &str)
 Hash a string. More...
 
hash_t hash (uint64_t v, uint64_t seed)
 Hash an integer value and combine it with a hash previously computed. More...
 
bool is_recursive_artefact (const type_or_decl_base &t)
 Test if an artifact is recursive. More...
 
void is_recursive_artefact (const type_or_decl_base &t, bool f)
 Set the property that flags an artifact as recursive. More...
 
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. More...
 
void set_hashing_state (const type_or_decl_base &tod, hashing::hashing_state s)
 Set the hashing state of an IR node. More...
 

Macro Definition Documentation

◆ MAYBE_FLAG_TYPE_AS_RECURSIVE

#define MAYBE_FLAG_TYPE_AS_RECURSIVE (   type,
  underlying,
 
)

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

◆ MAYBE_RETURN_EARLY_FROM_HASHING_TO_AVOID_CYCLES

#define MAYBE_RETURN_EARLY_FROM_HASHING_TO_AVOID_CYCLES (   type)

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

◆ MAYBE_RETURN_EARLY_IF_HASH_EXISTS

#define MAYBE_RETURN_EARLY_IF_HASH_EXISTS (   type)

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