diff options
author | Jason Merrill <jason@redhat.com> | 2000-06-15 17:24:39 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2000-06-15 17:24:39 -0400 |
commit | 297a5329dca4f22150ec201d48b8de8a730f6447 (patch) | |
tree | 8ef4fe73525824ae88ccfba0772d1ad4632e748a /gcc/cp/tree.c | |
parent | f5e6b7bc9e27420b063970b49bb62bcea1bff43d (diff) | |
download | gcc-297a5329dca4f22150ec201d48b8de8a730f6447.zip gcc-297a5329dca4f22150ec201d48b8de8a730f6447.tar.gz gcc-297a5329dca4f22150ec201d48b8de8a730f6447.tar.bz2 |
tree.c (count_trees): New debugging function.
* tree.c (count_trees): New debugging function.
* typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
* init.c (build_member_call): Pull out the name of a DECL.
* Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
* semantics.c (expand_body): Push to TV_INTEGRATION here.
* optimize.c (optimize_function): Not here.
* pt.c (instantiate_decl): Push to TV_PARSE.
From-SVN: r34568
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 382e254..c890c37 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -1396,6 +1396,30 @@ walk_tree (tp, func, data) #undef WALK_SUBTREE } +int n_trees; + +static tree +count_trees_r (tp, walk_subtrees, data) + tree *tp ATTRIBUTE_UNUSED; + int *walk_subtrees ATTRIBUTE_UNUSED; + void *data ATTRIBUTE_UNUSED; +{ + ++n_trees; + return NULL_TREE; +} + +/* Debugging function for measuring the rough complexity of a tree + representation. */ + +int +count_trees (t) + tree t; +{ + n_trees = 0; + walk_tree (&t, count_trees_r, NULL); + return n_trees; +} + /* Passed to walk_tree. Checks for the use of types with no linkage. */ static tree |