tree.c (count_functions, [...]): Remove.
authorKazu Hirata <kazu@cs.umass.edu>
Tue, 18 Jan 2005 23:51:26 +0000 (23:51 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Tue, 18 Jan 2005 23:51:26 +0000 (23:51 +0000)
* tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
cp_update_decl_after_saving, name_p): Remove.
* cp-tree.h: Remove the corresponding prototypes.

From-SVN: r93869

gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/tree.c

index e8e5176..dc11ad8 100644 (file)
@@ -8,6 +8,10 @@
        Remove.
        * cp-tree.h: Remove the corresponding prototypes.
 
+       * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
+       cp_update_decl_after_saving, name_p): Remove.
+       * cp-tree.h: Remove the corresponding prototypes.
+
 2005-01-18  Andrew Pinski  <pinskia@physics.uc.edu>
 
        PR c/19472
index 35787dd..d0d0d70 100644 (file)
@@ -4235,10 +4235,8 @@ extern tree build_cplus_staticfn_type            (tree, tree, tree);
 extern tree build_cplus_array_type             (tree, tree);
 extern tree hash_tree_cons                     (tree, tree, tree);
 extern tree hash_tree_chain                    (tree, tree);
-extern int count_functions                     (tree);
 extern int is_overloaded_fn                    (tree);
 extern tree get_first_fn                       (tree);
-extern int bound_pmf_p                         (tree);
 extern tree ovl_cons                            (tree, tree);
 extern tree build_overload                      (tree, tree);
 extern tree function_arg_chain                 (tree);
@@ -4269,7 +4267,6 @@ 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 special_function_kind special_function_p (tree);
-extern bool name_p                              (tree);
 extern int count_trees                          (tree);
 extern int char_type_p                          (tree);
 extern void verify_stmt_tree                    (tree);
@@ -4279,9 +4276,7 @@ extern tree cp_walk_subtrees (tree*, int*, walk_tree_fn,
                                      void*, struct pointer_set_t*);
 extern int cp_cannot_inline_tree_fn (tree*);
 extern tree cp_add_pending_fn_decls (void*,tree);
-extern int cp_is_overload_p (tree);
 extern int cp_auto_var_in_fn_p (tree,tree);
-extern void cp_update_decl_after_saving (tree, void *);
 extern tree fold_if_not_in_template             (tree);
 
 /* in typeck.c */
index d37f7d1..0a0b3ec 100644 (file)
@@ -769,20 +769,6 @@ debug_binfo (tree elem)
 }
 
 int
-count_functions (tree t)
-{
-  int i;
-  
-  if (TREE_CODE (t) == FUNCTION_DECL)
-    return 1;
-  gcc_assert (TREE_CODE (t) == OVERLOAD);
-  
-  for (i = 0; t; t = OVL_CHAIN (t))
-    i++;
-  return i;
-}
-
-int
 is_overloaded_fn (tree x)
 {
   /* A baselink is also considered an overloaded function.  */
@@ -820,16 +806,6 @@ get_first_fn (tree from)
   return OVL_CURRENT (from);
 }
 
-/* Returns nonzero if T is a ->* or .* expression that refers to a
-   member function.  */
-
-int
-bound_pmf_p (tree t)
-{
-  return (TREE_CODE (t) == OFFSET_REF
-         && TYPE_PTRMEMFUNC_P (TREE_TYPE (TREE_OPERAND (t, 1))));
-}
-
 /* Return a new OVL node, concatenating it with the old one.  */
 
 tree
@@ -2059,16 +2035,6 @@ cp_add_pending_fn_decls (void* fns_p, tree prev_fn)
   return prev_fn;
 }
 
-/* Determine whether a tree node is an OVERLOAD node.  Used to decide
-   whether to copy a node or to preserve its chain when inlining a
-   function.  */
-
-int
-cp_is_overload_p (tree t)
-{
-  return TREE_CODE (t) == OVERLOAD;
-}
-
 /* Determine whether VAR is a declaration of an automatic variable in
    function FN.  */
 
@@ -2079,20 +2045,6 @@ cp_auto_var_in_fn_p (tree var, tree fn)
          && nonstatic_local_decl_p (var));
 }
 
-/* FN body has been duplicated.  Update language specific fields.  */
-
-void
-cp_update_decl_after_saving (tree fn,
-                             void* decl_map_)
-{
-  splay_tree decl_map = (splay_tree)decl_map_;
-  tree nrv = DECL_SAVED_FUNCTION_DATA (fn)->x_return_value;
-  if (nrv)
-    {
-      DECL_SAVED_FUNCTION_DATA (fn)->x_return_value
-       = (tree) splay_tree_lookup (decl_map, (splay_tree_key) nrv)->value;
-    }
-}
 /* Initialize tree.c.  */
 
 void
@@ -2131,22 +2083,6 @@ special_function_p (tree decl)
   return sfk_none;
 }
 
-/* Returns true if and only if NODE is a name, i.e., a node created
-   by the parser when processing an id-expression.  */
-
-bool
-name_p (tree node)
-{
-  if (TREE_CODE (node) == TEMPLATE_ID_EXPR)
-    node = TREE_OPERAND (node, 0);
-  return (/* An ordinary unqualified name.  */
-         TREE_CODE (node) == IDENTIFIER_NODE
-         /* A destructor name.  */
-         || TREE_CODE (node) == BIT_NOT_EXPR
-         /* A qualified name.  */
-         || TREE_CODE (node) == SCOPE_REF);
-}
-
 /* Returns nonzero if TYPE is a character type, including wchar_t.  */
 
 int