From 8245c1946e77416ba5da37ecd3345c13f97a0822 Mon Sep 17 00:00:00 2001 From: Matt Austern Date: Wed, 1 Dec 2004 19:44:48 +0000 Subject: Compile speed improvement. * name-lookup.c (namespace_binding): Omit alias check for global namespace. From-SVN: r91575 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/name-lookup.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8b267c3..eff52c9 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2004-12-01 Matt Austern + + * name-lookup.c (namespace_binding): Omit alias check for global namespace. + 2004-12-01 Nathan Sidwell PR c++/18729 diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index ee0d1a4..6d5d00d 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -2735,7 +2735,10 @@ namespace_binding (tree name, tree scope) if (scope == NULL) scope = global_namespace; - scope = ORIGINAL_NAMESPACE (scope); + else + /* Unnecessary for the global namespace because it can't be an alias. */ + scope = ORIGINAL_NAMESPACE (scope); + binding = cxx_scope_find_binding_for_name (NAMESPACE_LEVEL (scope), name); return binding ? binding->value : NULL_TREE; -- cgit v1.1