diff options
author | Andi Kleen <ak@linux.intel.com> | 2014-08-01 02:51:46 +0000 |
---|---|---|
committer | Andi Kleen <ak@gcc.gnu.org> | 2014-08-01 02:51:46 +0000 |
commit | 50de5793fc6004bb8bf6f00e0f02e318f242ca2d (patch) | |
tree | 9412b4e4e83474bf33e0a8d77c44c60844e63b6b /gcc/tree.h | |
parent | 79ce6d77f62b4ebc1b297a1e170e9acb2f758c0d (diff) | |
download | gcc-50de5793fc6004bb8bf6f00e0f02e318f242ca2d.zip gcc-50de5793fc6004bb8bf6f00e0f02e318f242ca2d.tar.gz gcc-50de5793fc6004bb8bf6f00e0f02e318f242ca2d.tar.bz2 |
Change inchash to name space.
Change class inchash to move into a inchash namespace as requested.
The class is now inchash::hash
Rename iterative_hstate_expr to inchash::add_expr
... and convert existing users. It wasn't possible to use hash::,
because that lead to name space conflicts with cp and objc.
So class inchash is now inchash::hash and iterative_hstate_expr
is now inchash::add_expr.
gcc/:
2014-07-31 Andi Kleen <ak@linux.intel.com>
* inchash.h (inchash): Change inchash class to namespace.
(class hash): ... Rename from inchash.
(add_object): Move from macro to class template.
* lto-streamer-out.c (hash_tree): Change inchash
to inchash::hash.
* tree.c (build_type_attribute_qual_variant): Dito.
(type_hash_list): Dito.
(attribute_hash_list): Dito.
(iterative_hstate_expr): Rename to inchash::add_expr
(build_range_type_1): Change inchash to inchash::hash
and use hash::add_expr.
(build_array_type_1): Dito.
(build_function_type): Dito
(build_method_type_directly): Dito.
(build_offset_type): Dito.
(build_complex_type): Dito.
(make_vector_type): Dito.
* tree.h (iterative_hash_expr): Dito.
gcc/lto/:
2014-07-31 Andi Kleen <ak@linux.intel.com>
* lto.c (hash_canonical_type): Use inchash::hash
and use inchash::add_expr.
(iterative_hash_canonical_type): Dito.
From-SVN: r213394
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -4284,14 +4284,20 @@ extern int tree_log2 (const_tree); extern int tree_floor_log2 (const_tree); extern unsigned int tree_ctz (const_tree); extern int simple_cst_equal (const_tree, const_tree); -extern void iterative_hstate_expr (const_tree, inchash &); + +namespace inchash +{ + +extern void add_expr (const_tree, hash &); + +} /* Compat version until all callers are converted. Return hash for TREE with SEED. */ static inline hashval_t iterative_hash_expr(const_tree tree, hashval_t seed) { - inchash hstate (seed); - iterative_hstate_expr (tree, hstate); + inchash::hash hstate (seed); + inchash::add_expr (tree, hstate); return hstate.end (); } |