aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGabriel Dos Reis <gdr@integrable-solutions.net>2003-02-25 14:11:59 +0000
committerGabriel Dos Reis <gdr@gcc.gnu.org>2003-02-25 14:11:59 +0000
commit7d9f2df2637ee19e5c9a33f1a83c84364209b02a (patch)
tree780972bcc98a15076a226be442aad816c4857d0d /gcc
parent4cf8cbf05abdf033d2397b5ce0d27ead34bd0376 (diff)
downloadgcc-7d9f2df2637ee19e5c9a33f1a83c84364209b02a.zip
gcc-7d9f2df2637ee19e5c9a33f1a83c84364209b02a.tar.gz
gcc-7d9f2df2637ee19e5c9a33f1a83c84364209b02a.tar.bz2
decl.c (add_binding): Time TV_NAME_LOOKUP.
* decl.c (add_binding): Time TV_NAME_LOOKUP. (push_class_binding): Likewise. (set_namespace_binding): Likewise. From-SVN: r63410
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/decl.c10
2 files changed, 13 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index e793ab1..3f4c7f6 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * decl.c (add_binding): Time TV_NAME_LOOKUP.
+ (push_class_binding): Likewise.
+ (set_namespace_binding): Likewise.
+
2003-02-24 Mark Mitchell <mark@codesourcery.com>
PR c++/9836
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index caf3891..b249e5c 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -935,6 +935,7 @@ add_binding (tree id, tree decl)
tree binding = IDENTIFIER_BINDING (id);
int ok = 1;
+ timevar_push (TV_NAME_LOOKUP);
if (TREE_CODE (decl) == TYPE_DECL && DECL_ARTIFICIAL (decl))
/* The new name is the type name. */
BINDING_TYPE (binding) = decl;
@@ -991,7 +992,7 @@ add_binding (tree id, tree decl)
ok = 0;
}
- return ok;
+ POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, ok);
}
/* Add DECL to the list of things declared in B. */
@@ -1071,6 +1072,7 @@ push_class_binding (tree id, tree decl)
tree binding = IDENTIFIER_BINDING (id);
tree context;
+ timevar_push (TV_NAME_LOOKUP);
/* Note that we declared this value so that we can issue an error if
this is an invalid redeclaration of a name already used for some
other purpose. */
@@ -1113,7 +1115,7 @@ push_class_binding (tree id, tree decl)
in this class. */
INHERITED_VALUE_BINDING_P (binding) = 1;
- return result;
+ POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, result);
}
/* Remove the binding for DECL which should be the innermost binding
@@ -2114,6 +2116,7 @@ set_namespace_binding (tree name, tree scope, tree val)
{
tree b;
+ timevar_push (TV_NAME_LOOKUP);
if (scope == NULL_TREE)
scope = global_namespace;
@@ -2123,11 +2126,12 @@ set_namespace_binding (tree name, tree scope, tree val)
if (b == NULL_TREE || TREE_CODE (b) != CPLUS_BINDING)
{
IDENTIFIER_NAMESPACE_BINDINGS (name) = val;
- return;
+ POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, (void)0);
}
}
b = binding_for_name (name, scope);
BINDING_VALUE (b) = val;
+ timevar_pop (TV_NAME_LOOKUP);
}
/* Push into the scope of the NAME namespace. If NAME is NULL_TREE, then we