diff options
author | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-09 15:45:09 +0000 |
---|---|---|
committer | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-09 15:45:09 +0000 |
commit | 4dd41a12b4f57f7b1c60d264a89b190ba169d8fa (patch) | |
tree | 4ffe800b4c33c0db29f348e405ee0827f9871b15 /gcc/cp/cp-lang.c | |
parent | 89016db94b5a48c5da47202c6849ea3e5ba48134 (diff) | |
download | gcc-4dd41a12b4f57f7b1c60d264a89b190ba169d8fa.tar.gz |
2005-07-09 Andrew Pinski <pinskia@physics.uc.edu>
* cp-lang.c (shadowed_var_for_decl, decl_shadowed_for_var_lookup,
decl_shadowed_for_var_insert): Move over to cp-objcp-common.c.
(cp_init_ts): Call init_shadowed_var_for_decl.
Remove include of gt-cp-cp-lang.h.
* cp-objcp-common.c (shadowed_var_for_decl,
decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Moved from
cp-lang.c.
(init_shadowed_var_for_decl): New function to initialize
shadowed_var_for_decl.
Include gt-cp-cp-objcp-common.h.
* Make-lang.in (gt-cp-lang.h): Remove.
(gt-cp-cp-objcp-common.h): Add.
(cp/cp-lang.o): Remove dependancy on gt-cp-lang.h.
(cp/cp-objcp-common.o): Add dependancy on gt-cp-cp-objcp-common.h.
* config-lang.in (gtfiles): Remove cp-lang.c and Add cp-objcp-common.c.
* cp-tree (init_shadowed_var_for_decl): Add prototype.
2005-07-09 Andrew Pinski <pinskia@physics.uc.edu>
* config-lang.in (gtfiles): Add cp-objcp-common.c.
* objcp-lang.c (objcxx_init_ts): New function.
(LANG_HOOKS_INIT_TS): Define.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101830 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-lang.c')
-rw-r--r-- | gcc/cp/cp-lang.c | 38 |
1 files changed, 1 insertions, 37 deletions
diff --git a/gcc/cp/cp-lang.c b/gcc/cp/cp-lang.c index 1e3fb4d0195..c79486a0cfc 100644 --- a/gcc/cp/cp-lang.c +++ b/gcc/cp/cp-lang.c @@ -110,9 +110,6 @@ objcp_tsubst_copy_and_build (tree t ATTRIBUTE_UNUSED, return NULL_TREE; } -static GTY ((if_marked ("tree_map_marked_p"), param_is (struct tree_map))) - htab_t shadowed_var_for_decl; - static void cp_init_ts (void) @@ -142,40 +139,8 @@ cp_init_ts (void) tree_contains_struct[TEMPLATE_DECL][TS_DECL_MINIMAL] = 1; tree_contains_struct[ALIAS_DECL][TS_DECL_MINIMAL] = 1; - shadowed_var_for_decl = htab_create_ggc (512, tree_map_hash, - tree_map_eq, 0); - -} - -/* Lookup a shadowed var for FROM, and return it if we find one. */ - -tree -decl_shadowed_for_var_lookup (tree from) -{ - struct tree_map *h, in; - in.from = from; - - h = htab_find_with_hash (shadowed_var_for_decl, &in, - htab_hash_pointer (from)); - if (h) - return h->to; - return NULL_TREE; -} - -/* Insert a mapping FROM->TO in the shadowed var hashtable. */ + init_shadowed_var_for_decl (); -void -decl_shadowed_for_var_insert (tree from, tree to) -{ - struct tree_map *h; - void **loc; - - h = ggc_alloc (sizeof (struct tree_map)); - h->hash = htab_hash_pointer (from); - h->from = from; - h->to = to; - loc = htab_find_slot_with_hash (shadowed_var_for_decl, h, h->hash, INSERT); - *(struct tree_map **) loc = h; } void @@ -184,5 +149,4 @@ finish_file (void) cp_finish_file (); } -#include "gt-cp-cp-lang.h" #include "gtype-cp.h" |