Mercurial > hg > CbC > CbC_gcc
diff gcc/inchash.h @ 132:d34655255c78
update gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 10:21:07 +0900 |
parents | 84e7813d76e9 |
children | 1830386684a0 |
line wrap: on
line diff
--- a/gcc/inchash.h Thu Oct 25 08:08:40 2018 +0900 +++ b/gcc/inchash.h Thu Oct 25 10:21:07 2018 +0900 @@ -1,5 +1,5 @@ /* An incremental hash abstract data type. - Copyright (C) 2014-2017 Free Software Foundation, Inc. + Copyright (C) 2014-2018 Free Software Foundation, Inc. This file is part of GCC. @@ -57,12 +57,28 @@ val = iterative_hash_hashval_t (v, val); } + /* Add polynomial value V, treating each element as an unsigned int. */ + template<unsigned int N, typename T> + void add_poly_int (const poly_int_pod<N, T> &v) + { + for (unsigned int i = 0; i < N; ++i) + add_int (v.coeffs[i]); + } + /* Add HOST_WIDE_INT value V. */ void add_hwi (HOST_WIDE_INT v) { val = iterative_hash_host_wide_int (v, val); } + /* Add polynomial value V, treating each element as a HOST_WIDE_INT. */ + template<unsigned int N, typename T> + void add_poly_hwi (const poly_int_pod<N, T> &v) + { + for (unsigned int i = 0; i < N; ++i) + add_hwi (v.coeffs[i]); + } + /* Add wide_int-based value V. */ template<typename T> void add_wide_int (const generic_wide_int<T> &x)