libabigail
abg-hash.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2 // -*- mode: C++ -*-
3 //
4 // Copyright (C) 2013-2023 Red Hat, Inc.
5 
6 /// @file
7 
8 #ifndef __ABG_HASH_H__
9 #define __ABG_HASH_H__
10 
11 #include <stdint.h>
12 #include <cstddef>
13 #include <string>
14 
15 namespace abigail
16 {
17 /// Namespace for hashing.
18 namespace hashing
19 {
20  /// Produce good hash value combining val1 and val2.
21  /// This is copied from tree.c in GCC.
22  std::size_t
23  combine_hashes(std::size_t, std::size_t);
24 
25  uint32_t
26  fnv_hash(const std::string& str);
27 }//end namespace hashing
28 }//end namespace abigail
29 
30 #endif //__ABG_HASH_H__
uint32_t fnv_hash(const std::string &str)
Compute a stable string hash.
Definition: abg-hash.cc:64
Toplevel namespace for libabigail.