Mercurial > hg > CbC > CbC_gcc
comparison gcc/inchash.h @ 132:d34655255c78
update gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 10:21:07 +0900 |
parents | 84e7813d76e9 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
130:e108057fa461 | 132:d34655255c78 |
---|---|
1 /* An incremental hash abstract data type. | 1 /* An incremental hash abstract data type. |
2 Copyright (C) 2014-2017 Free Software Foundation, Inc. | 2 Copyright (C) 2014-2018 Free Software Foundation, Inc. |
3 | 3 |
4 This file is part of GCC. | 4 This file is part of GCC. |
5 | 5 |
6 GCC is free software; you can redistribute it and/or modify it under | 6 GCC is free software; you can redistribute it and/or modify it under |
7 the terms of the GNU General Public License as published by the Free | 7 the terms of the GNU General Public License as published by the Free |
55 void add_int (unsigned v) | 55 void add_int (unsigned v) |
56 { | 56 { |
57 val = iterative_hash_hashval_t (v, val); | 57 val = iterative_hash_hashval_t (v, val); |
58 } | 58 } |
59 | 59 |
60 /* Add polynomial value V, treating each element as an unsigned int. */ | |
61 template<unsigned int N, typename T> | |
62 void add_poly_int (const poly_int_pod<N, T> &v) | |
63 { | |
64 for (unsigned int i = 0; i < N; ++i) | |
65 add_int (v.coeffs[i]); | |
66 } | |
67 | |
60 /* Add HOST_WIDE_INT value V. */ | 68 /* Add HOST_WIDE_INT value V. */ |
61 void add_hwi (HOST_WIDE_INT v) | 69 void add_hwi (HOST_WIDE_INT v) |
62 { | 70 { |
63 val = iterative_hash_host_wide_int (v, val); | 71 val = iterative_hash_host_wide_int (v, val); |
72 } | |
73 | |
74 /* Add polynomial value V, treating each element as a HOST_WIDE_INT. */ | |
75 template<unsigned int N, typename T> | |
76 void add_poly_hwi (const poly_int_pod<N, T> &v) | |
77 { | |
78 for (unsigned int i = 0; i < N; ++i) | |
79 add_hwi (v.coeffs[i]); | |
64 } | 80 } |
65 | 81 |
66 /* Add wide_int-based value V. */ | 82 /* Add wide_int-based value V. */ |
67 template<typename T> | 83 template<typename T> |
68 void add_wide_int (const generic_wide_int<T> &x) | 84 void add_wide_int (const generic_wide_int<T> &x) |