OSDN Git Service

Compile speed improvement.
authoraustern <austern@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Dec 2004 19:44:48 +0000 (19:44 +0000)
committeraustern <austern@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Dec 2004 19:44:48 +0000 (19:44 +0000)
* name-lookup.c (namespace_binding): Omit alias check for global namespace.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91575 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/name-lookup.c

index 8b267c3..eff52c9 100644 (file)
@@ -1,3 +1,7 @@
+2004-12-01  Matt Austern  <austern@apple.com>
+
+       * name-lookup.c (namespace_binding): Omit alias check for global namespace.
+
 2004-12-01  Nathan Sidwell  <nathan@codesourcery.com>
 
        PR c++/18729
index ee0d1a4..6d5d00d 100644 (file)
@@ -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;