diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2004-08-19 11:17:01 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-08-19 11:17:01 +0000 |
commit | 50652ae91a0a3dd03af17d3d8c1fed92aeb33a29 (patch) | |
tree | ad4155c71e19a7d7b83ab0da21f83a27f8b56962 /gcc | |
parent | 31ebd7c88765448f74b92bb506b8bf81c3a3ea0e (diff) | |
download | gcc-50652ae91a0a3dd03af17d3d8c1fed92aeb33a29.zip gcc-50652ae91a0a3dd03af17d3d8c1fed92aeb33a29.tar.gz gcc-50652ae91a0a3dd03af17d3d8c1fed92aeb33a29.tar.bz2 |
cp-tree.h (build_shared_int_cst): Remove.
* cp-tree.h (build_shared_int_cst): Remove.
* tree.c (shared_int_cache): Remove.
(build_shared_int_cst): Remove.
* class.c (finish_struct_1): Use build_int_cst.
From-SVN: r86249
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/class.c | 2 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 1 | ||||
-rw-r--r-- | gcc/cp/tree.c | 19 |
4 files changed, 8 insertions, 21 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 0cd1b21..85d5038 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,12 @@ 2004-08-19 Nathan Sidwell <nathan@codesourcery.com> + * cp-tree.h (build_shared_int_cst): Remove. + * tree.c (shared_int_cache): Remove. + (build_shared_int_cst): Remove. + * class.c (finish_struct_1): Use build_int_cst. + +2004-08-19 Nathan Sidwell <nathan@codesourcery.com> + * decl.c (finish_enum): Do not copy value node early, copy later. * lex.c (cxx_init): Force null_node to be unique. diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 7c16791..1989dca 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -5085,7 +5085,7 @@ finish_struct_1 (tree t) thunk base function. */ DECL_VINDEX (fndecl) = NULL_TREE; else if (TREE_CODE (DECL_VINDEX (fndecl)) != INTEGER_CST) - DECL_VINDEX (fndecl) = build_shared_int_cst (vindex); + DECL_VINDEX (fndecl) = build_int_cst (NULL_TREE, vindex, 0); } } diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 04a39b7..b0f2697 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -4246,7 +4246,6 @@ extern tree cp_build_type_attribute_variant (tree, tree); extern tree cp_build_qualified_type_real (tree, int, tsubst_flags_t); #define cp_build_qualified_type(TYPE, QUALS) \ cp_build_qualified_type_real ((TYPE), (QUALS), tf_error | tf_warning) -extern tree build_shared_int_cst (int); extern special_function_kind special_function_p (tree); extern bool name_p (tree); extern int count_trees (tree); diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index aede4a6..a7309dd 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -1366,25 +1366,6 @@ build_min_non_dep (enum tree_code code, tree non_dep, ...) return t; } -/* Returns an INTEGER_CST (of type `int') corresponding to I. - Multiple calls with the same value of I may or may not yield the - same node; therefore, callers should never modify the node - returned. */ - -static GTY(()) tree shared_int_cache[256]; - -tree -build_shared_int_cst (int i) -{ - if (i >= 256) - return build_int_cst (NULL_TREE, i, 0); - - if (!shared_int_cache[i]) - shared_int_cache[i] = build_int_cst (NULL_TREE, i, 0); - - return shared_int_cache[i]; -} - tree get_type_decl (tree t) { |